range() Function

range() Function

>>> for i in range(5):
...     print(i)
...
0
1
2
3
4
range(5, 10)
   5, 6, 7, 8, 9

range(0, 10, 3)
   0, 3, 6, 9

range(-10, -100, -30)
  -10, -40, -70

Iterates over a sequence of numbers.

Related concepts

range() Function — Structure map

Clickable & Draggable!

range() Function — Related pages: