r/ProgrammerHumor • • Aug 26 '20

Python goes brrrr

Post image
59.2k Upvotes

789 comments sorted by

View all comments

Show parent comments

4

u/juzz_fuzz Aug 26 '20

yes you can do that, but my code was simplified by simple counting into the negative. I was solving this problem https://projecteuler.net/problem=11, needed to multiply the start of row/column lists with the end of those lists sometimes

2

u/juzz_fuzz Aug 26 '20

x[y] * x[y-1] * x[y-2] * x[y-3] works in python even if the y element iterator is less than 2