Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python last n array elements

array = ["a", "b", "c", "d"]

num_elements = 3
print(array[-num_elements:])
 
PREVIOUS NEXT
Tagged: #python #array #elements
ADD COMMENT
Topic
Name
3+2 =