From e2fe947b795571393c2ef35d9cad5fe08d4e8033 Mon Sep 17 00:00:00 2001 From: Jeff Carpenter Date: Fri, 28 Jun 2013 17:11:32 -0700 Subject: [PATCH] Reverse "omit the beginning|end" While reading I thought this might be a mistake (or I'm just going crazy). --- python.html.markdown | 4 ++-- 1 file 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]