Here is my list of tuples
[('Raven', '18'), ('Lion', '6'), ('Unassigned', '0'), ('Cobra', '6')]
I want to sort them by the value of the number in the tuple, to achieve this order.
[('Raven', '18'), ('Lion', '6'), ('Cobra', '6'), ('Unassigned', '0')]
How best is it to go about this, should I use sorted()
?