list1 = ['a','b','c']
print(list1[-1])
lst = [2, 5 , 6, 3, 8, 9]
n = len(lst) #get the length
last_el = lst[n-1] #get the last element
print("The last element of the list is:", last_el)
l = [1, 2, 3, 4, 5]
print(l[-1])
>>> a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
>>> a
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
>>> a[-9:]
[4, 5, 6, 7, 8, 9, 10, 11, 12]
bikes = ['trek', 'redline', 'giant']
bikes[-1]
L=[1,2,3,4,5]
lastElement=L[L.size()]