how to get the index of the last element on a python list code example Example: python last element of list print(list[-1])