Get last element from a list in Python

Array based access can retrieve the element from list, list[0] would return the first element from the list. Negative index can be used to access the list elements from end. -1 would retrieve last element of the list. -2 would return last but one.

investments = ['Mutual Fund', 'Equity', 'Stock']
print(investments[-1])


Output
Stock