key function to extract the last element python code example Example: how to find the last item of a list list1 = ['a','b','c'] print(list1[-1])