Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

slice notation python

a[-1]    # last item in the array
a[-2:]   # last two items in the array
a[:-2]   # everything except the last two items
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #slice #notation #python
ADD COMMENT
Topic
Name
7+9 =