Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

last element of python list

list1 = [1, 2, 3, 4, 5]
print(list1[len(list1)-1])
print(list1[-1])
print(list1.pop())
Source by www.howtouselinux.com #
 
PREVIOUS NEXT
Tagged: #element #python #list
ADD COMMENT
Topic
Name
2+1 =