MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/igvny1/python_goes_brrrr/g2wkcqi/?context=3
r/ProgrammerHumor • u/das_freak • Aug 26 '20
789 comments sorted by
View all comments
2
my favorite thing for preallocating arrays when I know they will stay a fixed size is to do like
arr = [None] * arr_length
it looks uncomfortable to me but at the same time so elegant
2
u/[deleted] Aug 26 '20
my favorite thing for preallocating arrays when I know they will stay a fixed size is to do like
arr = [None] * arr_length
it looks uncomfortable to me but at the same time so elegant