I need to sort something like
list = [('B', 2), ('A', 6), ('D', 4), ('E', 6), ('C', 2)]
into:
sorted_list = [('A', 6), ('E', 6), ('D', 4), ('B', 2), ('C', 2)]
So it is first sorted from the tuple with the highest number first, then if the numbers are equal, the tuples are sorted alphabetically by the letter in the first element.
So priority is highest to lowest in terms of the numbers in each tuple, then alphabetically if 2 or more values are equal.