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 7b6edae7..971ca0a4 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -387,6 +387,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 |