Run the following doctest to verify that the solution given works as expected.
>>> def penultimate(some_list): ... return some_list[-2] >>> >>> a_list = [0, 1, 2, 3, 4, 5, 6, 7] >>> penultimate(a_list) 6 >>> another_list = ['a', 'b', 'c', 'd', 'e', 'f'] >>> penultimate(another_list) 'e'