r/ProgrammerHumor • • Aug 26 '20

Python goes brrrr

Post image
59.2k Upvotes

789 comments sorted by

View all comments

31

u/juzz_fuzz Aug 26 '20

best feature of python I used recently was solving a projecteuler.net problem and utilizing the fact that list[-x] means x elements back from the end of the list, simplified the code so much

11

u/Masked_Death Aug 26 '20

Yeah, this is one of my favorite things. Reversing a list takes literally no effort as well. Need to read the last 4 elements? Also simple, no matter if you want to read them forwards or backwards.

→ More replies (7)