I have a dictionary which has the following structure in a python program
{'John':{'age': '12', 'height':'152', 'weight':'45}}
, this is the result returned from a function.
My question is how may I extract the sub-dictionary please? so that I can have the data in this form only {'age': '12', 'height':'152', 'weight':'45}
.
*I can think of a solution of using for loop to go through the dictionary, since there is only one item in this dictionary, I can then store it into a new variable, but I could like to learn an alternative please
Many thanks