ls grab last item in list code example Example 1: python get last element in list l = [1, 2, 3] l[-1] Example 2: get the last element of a list python print(list[-1])