When I define
for i in range (5):
My range goes through 0,1,2,3,4,5 or 1,2,3,4,5
When I define
for i in range (5):
My range goes through 0,1,2,3,4,5 or 1,2,3,4,5
Will generate 0, 1, 2, 3 and 4 Normally, the first range parameter is the starting number, the second is the final but excluding. In your example, range (5), python assumes that the initial parameter is equal to 0. It will generate the numbers based on this condition: greater / equal to zero and less than 5.
In Python the count starts from zero, then:
list(range(5))
[0,1,2,3,4]