2.4.2.3 The range() Function
Python Programming
We can use the range() function to generate a sequence of numbers, which is often used in for loops.
python
# Syntax of range function
range(stop)
range(start, stop)
range(start, stop, step)Example: Print the numbers from 0 to 4.
python
for i in range (5) :
print (i)