擅长:python、mysql、java
<p>这样做可以:</p>
<pre><code>sorted_keys = sorted(my_dic, key=lambda x: (my_dic[x]['Points'], my_dic[x]['win'], x),
reverse=True)
print([(key, my_dic[key]) for key in sorted_keys])
Output:
[('Spain', {'Points': 5, 'diffrence': 2, 'drawes': 2, 'lose': 0, 'win': 1}),
('Portugal', {'Points': 4, 'diffrence': 0, 'drawes': 1, 'lose': 1, 'win': 1}),
('Iran', {'Points': 4, 'diffrence': 0, 'drawes': 1, 'lose': 1, 'win': 1}),
('Morocco', {'Points': 3, 'diffrence': -2, 'drawes': 0, 'lose': 2, 'win': 1})]
</code></pre>