Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get last 3 elements in a list python

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

num_elements = 3
print(array[-num_elements:])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #elements #list #python
ADD COMMENT
Topic
Name
4+3 =