python get 2nd to last item in list code example Example: python second to last element in list result = list[-2]