Range Function
The range function returns an immutable sequence of numbers and is commonly used for looping a specific number of times in for loops. The syntax for the range function is range([start,] stop[, step])
, with start defaulting to 0 and step defaulting to 1.
for i in range(0, 10, 2):
print(i) # 0, 2, 4, 6, 8