Python之字典
1.创建字典
from collections import defaultdict d1 = defaultdict(int)
2.按照value值排序
print sorted(dict.items(), key=operator.itemgetter(1))
黄世宇/Shiyu Huang's Personal Page:https://huangshiyu13.github.io/
1.创建字典
from collections import defaultdict d1 = defaultdict(int)
2.按照value值排序
print sorted(dict.items(), key=operator.itemgetter(1))