代码
my_dic = collections.defaultdict(dict) #或者 import collections my_dic = defaultdict(dict)
把字典的 value 设置一个默认类型。