Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python select last item in list

# Basic syntax:
your_list[-1]

# Example usage:
your_list = [1, 'amazing', 'list']
your_list[-1]
--> 'list'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #select #item #list
ADD COMMENT
Topic
Name
3+7 =