r/ProgrammerHumor • • Aug 26 '20

Python goes brrrr

Post image
59.2k Upvotes

789 comments sorted by

View all comments

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