Python Program to Get the Last Element of the List
my_list = ['a', 'b', 'c', 'd', 'e']
# print the last element
print(my_list[-1])
Output
e
my_list = ['a', 'b', 'c', 'd', 'e']
# print the last element
print(my_list[-1])
Output
e