What step does in Range Function?


Replace this line with your code.


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:



Thank you so much :slight_smile:


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


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