from collections import defaultdict d1 = defaultdict(int)
Python之字典
原文:https://www.cnblogs.com/huangshiyu13/p/8587469.html