Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get last item on list

# You can index using -1 to get the last item on the list

names = ['collins', 'emasi', 'sam']
l_item = names[-1]

# Output: sam
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #item #list
ADD COMMENT
Topic
Name
7+1 =