What step does in Range Function?


#1



Replace this line with your code.


#2

by default step is one:

for i in range(3, 10):
    print i

but we can change this:

for i in range(0, 10, 3):
    print i

now steps will be 3, so i will increase by 3 each time (the second program outputs:

0
3
6
9

#3

Thank you so much :slight_smile:


#4

python also has doc about built in functions, which includes range


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.