summaryrefslogtreecommitdiffhomepage
path: root/python.html.markdown
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2013-06-28 17:15:43 -0700
committerAdam Bard <github@adambard.com>2013-06-28 17:15:43 -0700
commit823f5d2ab869fa48a3471913e33d43d4547e1cb6 (patch)
tree1e887b9551019299889a8d3abcea80e660a6fa85 /python.html.markdown
parent3301f770627de64914d902798840cf8f87f4b066 (diff)
parente2fe947b795571393c2ef35d9cad5fe08d4e8033 (diff)
Merge pull request #30 from jeffcarp/master
Reverse "Omit the beginning" and "Omit the end" examples
Diffstat (limited to 'python.html.markdown')
-rw-r--r--python.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/python.html.markdown b/python.html.markdown
index a599f5d3..c521617a 100644
--- a/python.html.markdown
+++ b/python.html.markdown
@@ -134,9 +134,9 @@ except IndexError:
# (It's a closed/open range for you mathy types.)
li[1:3] #=> [2, 4]
# Omit the beginning
-li[:3] #=> [1, 2, 4]
-# Omit the end
li[2:] #=> [4, 3]
+# Omit the end
+li[:3] #=> [1, 2, 4]
# Remove arbitrary elements from a list with del
del li[2] # li is now [1, 2, 3]