fork download
  1. lista= [('Ana', 30, 6.69), ('João', 25, 6.11), ('Pedro', 30, 6.69), ('Maria', 28, 5.45), ('Thiago', 40, 5.45), ('Raquel', 26, 10.0)]
  2. lista.sort(key=lambda x: (-x[2], x[1], x[0]))
  3. print(lista)
  4.  
Success #stdin #stdout 0.04s 9304KB
stdin
Standard input is empty
stdout
[('Raquel', 26, 10.0), ('Ana', 30, 6.69), ('Pedro', 30, 6.69), ('João', 25, 6.11), ('Maria', 28, 5.45), ('Thiago', 40, 5.45)]