Merge pull request #30 from jeffcarp/master

Reverse "Omit the beginning" and "Omit the end" examples
This commit is contained in:
Adam Bard 2013-06-28 17:15:43 -07:00
commit 823f5d2ab8

View File

@ -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]