The range() function is a built-in function of Python. It is used to create a list containing a sequence of integers from the given start value to stop value (excluding stop value). This is often used in for loop for generating the sequence of numbers.
Example:
for num in range(0,5):
print (num)
OUTPUT:
0
1
2
3
4