The range function in Python can be used for counting upward, counting downward, or performing an operation a number of times.
To count upwards in Python, the range function is a convenient option. It accepts a start and stop integer and generates a sequence of numbers from the start to just before the stop number.
You can also call range with just one argument to start at 0 and stop just before that argument.
The range function can also accept a third argument to specify a step value.