getting the second from last element of a list in python code example Example: python second to last element in list result = list[-2]