运维网's Archiver
论坛
›
Python
› python: 字典嵌套
qq591577286
发表于 2018-8-9 12:55:52
python: 字典嵌套
>>> from collections import defaultdict >>> a = defaultdict(dict)
>>> a['hell']['good']= 1
>>> a
defaultdict(<class 'dict'>, {'hell': {'good': 1}})
页:
[1]
查看完整版本:
python: 字典嵌套