python select last item in list code example
Example 1: python last element of list
print(list[-1])
Example 2: python select last item in list
# Basic syntax:
your_list[-1]
# Example usage:
your_list = [1, 'amazing', 'list']
your_list[-1]
--> 'list'