标签:python
>>> from collections import defaultdict >>> a = defaultdict(dict) >>> a[‘hell‘][‘good‘]= 1 >>> a defaultdict(<class ‘dict‘>, {‘hell‘: {‘good‘: 1}})
python: 字典嵌套
原文地址:http://blog.51cto.com/11962757/2088938