How to get a key from inside another key in python

Hey does anybody know how I would go about getting the value of a key which is already inside another key like this:

a = {"fruit":[{"oranges":['10']},{"apples":['11']}]}

I can get the value of "fruit" but how would I get the value of "oranges".
Thank you for any help in advance.

>Solution :

You just have to access the first element of the list inside fruits, and then access the key inside


Leave a Reply