summaryrefslogtreecommitdiffhomepage
path: root/python3.html.markdown
diff options
context:
space:
mode:
authorSriram Sundarraj <sriram.s.1994@gmail.com>2015-04-23 02:06:43 +0530
committerSriram Sundarraj <sriram.s.1994@gmail.com>2015-04-23 02:06:43 +0530
commit8cfb7ba02f7d53b6b33ff5e776289ee4fcb48618 (patch)
treed60e2be67b364decd24bf28231a624f2962b6dae /python3.html.markdown
parentd20eb1fb94c819283e610bbd9f1cf3cea834da46 (diff)
[python/en] Range function arguments.
Range function with start and stop.
Diffstat (limited to 'python3.html.markdown')
-rw-r--r--python3.html.markdown12
1 files changed, 12 insertions, 0 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index 6c5e1059..470eb6e4 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -340,6 +340,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