我有一个嵌套字典.是否只有一种方法可以安全地获得价值?
try: example_dict['key1']['key2'] except KeyError: pass
或者python有一个像get()嵌套字典的方法?
get()
python methods dictionary except
dictionary ×1
except ×1
methods ×1
python ×1