a={‘a‘:{‘b‘:‘oo‘},‘c‘:{‘d‘:‘袁珂‘}}
#del a[‘a‘]
a.pop(‘a‘) #标准姿势
print(a.get(‘c‘))
print(a.get(‘a‘))
print(a.setdefault(‘f‘,‘逯晓华‘))
print(a[‘f‘])
print(a.setdefault(‘gg‘,‘ssss‘))
print(a)
print(a.keys())
print(a.values())
print(‘分割线‘.center(100,‘*‘))
print(a[‘c‘][‘d‘])
原文:https://www.cnblogs.com/yuanke98/p/9189169.html