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.
 
PREVIOUS NEXT
Tagged: #python #slice
ADD COMMENT
Topic
Name
2+4 =