data = {(0, 3): (3, 8), (0, 11): (4, 4), (1, 4): (5, 32)} print(sorted(sorted(data.keys(), key=lambda x: x[1], reverse=True), key=lambda x:x[0]))
[(0, 11), (0, 3), (1, 4)]
https://wiki.python.org/moin/HowTo/Sorti...plex_Sorts
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs