Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python last 3 list elements

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

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