Skip to content

Commit

Permalink
個数の降順でソート
Browse files Browse the repository at this point in the history
  • Loading branch information
jun68ykt committed Oct 6, 2018
1 parent ea54a61 commit 857b40a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion count.py
Expand Up @@ -27,5 +27,5 @@ def count(name_id, indexes, data):
continue
result[name] = count(t[0], m["indexes"], m["data"])

for k, v in sorted(result.items()):
for k, v in sorted(result.items(), key=lambda x: -x[1]):
print("%s: %d" % (k, v))

0 comments on commit 857b40a

Please sign in to comment.