Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

is : and :: the same in python slice

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: #python #slice
ADD COMMENT
Topic
Name
6+4 =