summaryrefslogtreecommitdiffhomepage
path: root/python.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'python.html.markdown')
-rw-r--r--python.html.markdown12
1 files changed, 12 insertions, 0 deletions
diff --git a/python.html.markdown b/python.html.markdown
index 63547bf6..668e04f9 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -347,6 +347,18 @@ for i in range(4):
print(i)
"""
+"range(lower, upper)" returns a list of numbers
+from the lower number to the upper number
+prints:
+ 4
+ 5
+ 6
+ 7
+"""
+for i in range(4, 8):
+ print(i)
+
+"""
While loops go until a condition is no longer met.
prints:
0