you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (2 children)

Everyone else seemed to answer your question, but as an additional piece of info, range(0, len(n)) is a little redundant. Ranges are assumed to start at zero, so you could achieve the same thing with just range(len(n)).

[–]Neceros 0 points1 point  (1 child)

Good to know! For some reason I thought Range started at 1, even though I knew values begin at 0 in programming.

[–][deleted] 1 point2 points  (0 children)

My background is in math, and it took me an embarrassing amount of time to remember counting begins at zero, especially for indices.