I want to show the list from the large age to the small age. Here is my list:
player = [("Dmitry", 15), ("Dima", 11), ("Sergey", 14), ("Andrey", 12), ("Nikita", 13)]
I can sort list using name element by player.sort
and get this list:
[('Andrey',12),('Dima',11),('Dmitry',15),('Nikita',13),('Sergey',14)]
But I want this list, where ages are large age to small age:
[('Dmitry',15),('Sergey',14),('Nikita',13),('Andrey',12),('Dima',11)]
How I can do this?