Bit of a python newbie, but I got the following list of tuples. I need to sort it by value and if the value is the same, solve ties alphabetically. Here\'s a sample:
You can use the sorted function:
sorted
sorted_by_medals = sorted(list_of_medals, key=lambda tup: (-tup[1], tup[0]))