Define a function last
which returns
the last element of a list.
>>> a_list = [0, 1, 2, 3, 4, 5, 6, 7] >>> last(a_list) 7 >>> another_list = ['a', 'b', 'c', 'd', 'e', 'f'] >>> last(another_list) 'f'
What do you think the return value should be for an empty list?
Solution