Python’s inbuilt  range() function is handy when you need to act a specific number of times. The range() function enables us to make a series of numbers within the given range. Depending on how many arguments you pass to the range() function, you can choose where that sequence of numbers will begin and end as well as how big the difference will be between one number and the next.

Syntax

range(start, stop, step)

Parameters

  1. start argument is the starting number of the series. i.e., lower limit. By default, it starts with 0 if not specified.
  2. stop argument is an upper limit. i.e., create numbers up to this number, The range() doesn’t include this number in the result.
  3. The step is the difference between each number in the output. The default value of the step is 1 if not specified.

#python

How to reverse a range in Python
2.15 GEEK