python get last item in an array code example Example 1: get last element of array python some_list[-1] Example 2: get the last element of a list python print(list[-1])