diff options
Diffstat (limited to 'python.html.markdown')
-rw-r--r-- | python.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python.html.markdown b/python.html.markdown index b035b0f5..3466e1c4 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -136,9 +136,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] |