diff options
Diffstat (limited to 'python3.html.markdown')
-rw-r--r-- | python3.html.markdown | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python3.html.markdown b/python3.html.markdown index b3acb122..4696ae1c 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -352,6 +352,18 @@ for i in range(4, 8): print(i) """ +"range(lower, upper, step)" returns an iterable of numbers +from the lower number to the upper number, while incrementing +by step. If step is not indicated, the default value is 1. +prints: + 4 + 6 + 8 +""" +for i in range(4, 8, 2): + print(i) +""" + While loops go until a condition is no longer met. prints: 0 |