summaryrefslogtreecommitdiffhomepage
path: root/python3.html.markdown
diff options
context:
space:
mode:
authorAdrian Sieber <mail@adriansieber.com>2017-02-10 07:58:10 +0000
committerven <vendethiel@hotmail.fr>2017-02-10 08:58:10 +0100
commit870e2fbf6dccfe9d769bf3d6ccae402d698322df (patch)
treea583d97e165f6d8af3439ec02712ec99ab4e83cb /python3.html.markdown
parentd8a3184a73cfbb3be3ab99e7d7e3ebc577d06494 (diff)
Fix omitting end / beginning in ranges (#2649)
Diffstat (limited to 'python3.html.markdown')
-rw-r--r--python3.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index 02745117..596b53e6 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -208,9 +208,9 @@ li[4] # Raises an IndexError
# You can look at ranges with slice syntax.
# (It's a closed/open range for you mathy types.)
li[1:3] # => [2, 4]
-# Omit the beginning
-li[2:] # => [4, 3]
# Omit the end
+li[2:] # => [4, 3]
+# Omit the beginning
li[:3] # => [1, 2, 4]
# Select every second entry
li[::2] # =>[1, 4]