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

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -