I have a list of tuples. When I sort it, it is sorted by the first item of the tuple. How can I sort the list by the second item of the tuples?
E.g.
Input list = [('c', 23), ('a', 55), ('e', 11), ('b', 45), ('d', 34), ('f', 5)]
Output list = [('f', 5), ('e', 11), ('c', 23), ('d', 34), ('b', 45), ('a', 55)]