📜  python代码示例中的二维字典

📅  最后修改于: 2022-03-11 14:45:56.215000             🧑  作者: Mango

代码示例1
# It would have the following syntax
dict_names = {'d1' : {'name':'bob', 'place':'lawn', 'animal':'man'},
              'd2' : {'name':'spot', 'place':'bed', 'animal':'dog'}}

# You can then look things up like
>>> dict_names['d1']['name']
'bob'