python how to find last item in set code example Example 1: python last element of list print(list[-1]) Example 2: how to print last element in a list python lis[len(lis)-1]