Normally when we use for loop and range() method in Python it stops at just before the range we mentioned.
It looks like :
for i in range(10):
And it reads from 0 to 9 and stops.
Basically through the range() method of Python, we pass three variables – start, stop and step. In between these three variables, by default the values of ‘start’ and ‘stop’ are pre-set. ‘start’ is 0 and ‘stop’ is 1. So it starts from 0 and each step it iterates 1 step and stops at 9. In it the ‘stop’ value remains inconclusive.
But we can make the ‘stop’ value conclusive by the following method: