| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx

python怎么生成一个嵌套字典,不想使用defaultdict实现

0
Python C/C++ 嵌套字典 36613 次浏览

比如原生的dict属性

test=dict()
test['a']=1         # 这个可以实现
test['x']['y']=2    # 这个就会报错

我想生成一个递归字典,如果没有这个键则创建,哪种方法能简洁点,优雅点~~多谢了

168个答案

0
0

Bozeman Towing Company provides 24-hour towing and roadside assistance services to the Gallatin Valley and surrounding areas including Bozeman, Livingston, Big Sky and Belgrade.tow truck Bozeman

0
0
0
0
0
0
0
0
0
0

That's a very good idea.

commercial handyman

0

You're more fun than a ball pit filled with candy.https://guitarlessonsportlandor.com

0

You're more fun than a ball pit filled with candy.https://guitarlessonsportlandor.com

0
0

<a href="http://www.zhonghua19.tw/category.php?id=1" target="_blank">持久藥  </a> 
<a href="http://www.zhonghua19.tw/category.php?id=2" target="_blank">壯陽藥ptt</a> 
<a href="http://www.zhonghua19.tw/category.php?id=2" target="_blank">壯陽藥屈臣氏 </a> 
<a href="http://www.zhonghua19.tw/category.php?id=2" target="_blank">壯陽藥 </a> 
<a href="http://www.zhonghua19.tw/category.php?id=4" target="_blank">壯陽藥推薦 </a>

0
0
0
0
1 2 3 4 5 6 7 8 9