擅长:python、mysql、java
<pre><code>d = { "key1" : 1, "key2" : 2, ...., "key100" : 100 }
a = sorted(d.values())
a.reverse()
req_list = []
for i in a[:5]:
req_list.append(d.keys()[d.values().index(i)])
print req_list
</code></pre>
<p>这将为您提供5个最大值的列表。这是你想要的吗?你知道吗</p>