range() function with step : range « Buildin Function « Python






range() function with step

range() function with step



print "\n\nCounting by fives:"
for i in range(0, 50, 5):
    print i,


           
       








Related examples in the same category

1.Assigning Consecutive ValuesAssigning Consecutive Values
2.Demonstrates the range() functionDemonstrates the range() function
3.Demonstrates the range() function with negative step
4.range() Functionrange() Function
5.Demo the range functionDemo the range function
6.range function with stepsrange function with steps
7.range with steprange with step