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

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -