Accessing dictionary of dictionary in python

后端 未结 7 522
醉梦人生
醉梦人生 2021-01-22 09:47

Hi in my code there is a dictionary of dictionary.

nrec={\'bridge\': \'xapi1\', \'current_operations\': {}, \'uuid\': \'9ae5ca7d-e7d6-7a81-f619-d0ea33efb534\', \         


        
7条回答
  •  情话喂你
    2021-01-22 10:09

    Try this:

    nrec["other_config"].get('is_guest_installer_network')
    

    It'll return its value if 'is_guest_installer_network' exists in nrec['other_config']

提交回复
热议问题