Python Range() – This function is used to return a sequence of numbers, for a given range. The common use of it is to iterate ( traverse ) the sequence on a sequence of given numbers using Python loops.
range(startFrom, stopAt, step)
- startFrom – Represents the start value of the sequence. It is optional.
- stopAt – represents the next value after the end value of the sequence.
- step – It is an integer value that denotes the difference between any two numbers in the sequence. It is optional.