In python, range() function is useful to generate the sequence of numbers starting from 0 based on the specified values. For example, if you specify the range(5) it will generate the numbers starting 0 to 4.
The following is the syntax of defining the range() function in python.
If you observe the above range() function syntax, we used three parameters to define the range function, and all those parameters should be integers.
The following is the example of using the range() function in python to generate the sequence of numbers.
If you observe the above example, we used different arguments in the range() function to generate the sequence of numbers based on our requirements.
When you execute the above python example, you will get the result as shown below.
This is how you can use the range() function in your program to generate the sequence numbers based on your requirements.