Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python slice

l = ["a", "b", "c", "d", "e", "f", "g", "h", "i"]
x = slice(3)
print(l[x])
#gets the first three elemnets from list(array) l.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #slice
ADD COMMENT
Topic
Name
4+8 =