Answers for "sort first element reverse sort second python"

0

sort first element reverse sort second python

>>> sorted(lista, key=lambda x: (-x[0], x[1]))
[(485, 'Elizabeth'), (485, 'Matthew'), (390, 'Jayden'), (207, 'Natalie'), (144, 'Chloe'), (51, 'Elijah')]
Posted by: Guest on March-31-2021

Code answers related to "sort first element reverse sort second python"

Python Answers by Framework

Browse Popular Code Answers by Language