python how to find last item of a 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]