If I have a list of lists like this:
lista = [['ana','1'], ['joao', '3'], ['rita','2'], ['alice','2']]
I first want to sort the list according to the numbers, to look like this:
lista = [['ana','1'], ['rita','2'], ['alice','2'], ['joao', '3']]
What I did with: listaOrdenada = sorted(lista, key = lambda x: x[1])
But as in this case I have two lists with the number '2', I want to sort these two lists alphabetically by name, how do I do this?