Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

is : and :: the same in python slice

a[::-1]    # all items in the array, reversed
a[1::-1]   # the first two items, reversed
a[:-3:-1]  # the last two items, reversed
a[-3::-1]  # everything except the last two items, reversed
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #slice
ADD COMMENT
Topic
Name
2+4 =