How to get nested dictionary key value with .get()
How to get nested dictionary key value with .get() Question: With a simple dictionary like: myDict = {‘key1’:1, ‘key2’:2} I can safely use: print myDict.get(‘key3′) and even while ‘key3’ is not existent no errors will be thrown since .get() still returns None. Now how would I achieve the same simplicity with a nested keys dictionary: …
Total answers: 6