Error in explanation?

Under “Working with lists in Python” in “The Power of Range” section ( https://www.codecademy.com/paths/analyze-data-with-python/tracks/ida-2-introduction-to-python/modules/ida-2-3-python-lists/lessons/use-python-list/exercises/the-power-of-range ), there seems to be an error in the Learn Section.


On the last line, instead of 100 it should be 99 right?

Nope.

Your arguments that you passed through are: 1, 100, 10, or, the start (index), stop (the number you’re ending/stopping at), step (the increase). So, 91 + 10 = 101, which is greater than the stopping point of 100.

See:
https://docs.python.org/3.10/tutorial/controlflow.html?highlight=range#the-range-function

And:
https://docs.python.org/3.10/library/stdtypes.html#range

1 Like