I need to order lists inside of a list by the numbers in decreasing order. If the number is the same, I have to order it in alphabetical order (increasing).
For example if I have the following list:
mylist=[['a', 5], ['l', 2], ['u', 1], ['t', 1], ['q', 1], ['o', 1], ['e', 1]]
The output has to be like this:
[['a', 5], ['l', 2], ['e', 1], ['o', 1], ['q', 1], ['t', 1], ['u', 1]]
I have searched for this, but I can only found how to order a list. The problem here is that I have to order it by the alphabet just when the number is the same. So the order is first by the numbers (I´ve reached that already), and then I have to order it but the alphabet when the numbers are the same.