1.创建字典
from collections import defaultdict d1 = defaultdict(int)
2.按照value值排序
print sorted(dict.items(), key=operator.itemgetter(1))