get last value on list<object> code example
Example 1: how to find the last item of a list
list1 = ['a','b','c']
print(list1[-1])
Example 2: how to find last element of list
L=[1,2,3,4,5]
lastElement=L[L.size()]
list1 = ['a','b','c']
print(list1[-1])
L=[1,2,3,4,5]
lastElement=L[L.size()]