Python's `range` function with 3 parameters -


i understand following line give given result:

for in range(5):    print(i) 

0 1 2 3 4

but don't understand how if adding 3 separate parameters result confusing. how returning these particular results? (4 6 , 8) ????

for in range(4, 10, 2):  print(i)  

4 6 8

starts @ 4, increments 2, end @ 8 because 10 < 10 false. 4 6 8


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -