I am a little new to python and need help in this,
dict_o = {'chamcham': 200,
'kajukatli': 400,
'jalebi': 1000,
'chowmen': 1500,
'outsourced':{'samosa': 200,
'mungfali': 400,
'springrolls': 1000,
'chomen': 1800}}
I want the values which are provided in a list like
list = ['chamcham',"['outsourced']['springrolls']"]
(specifying this way a list is a wrong syntax).
in other words, how to we get the value against 'chamcham' and 'springrolls' which is a nested key in the 'outsourced' nested dictionary. the keys of which value is required is a list?
I have referred to How to retrieve values from nested dictionary given list of keys? but this works only when list has nested elements only and not a combination of nested and first level keys.