summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSriram Sundarraj <sriram.s.1994@gmail.com>2015-04-24 01:50:17 +0530
committerSriram Sundarraj <sriram.s.1994@gmail.com>2015-04-24 01:50:17 +0530
commit98aa4ef43c84b9bdaa988971174bbb21e042e6ac (patch)
tree557acb41a48e8dea86e74c89ab30f8ab2cbed93c
parent8cfb7ba02f7d53b6b33ff5e776289ee4fcb48618 (diff)
[python/en] Added range(start, stop).
-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