I have a dictionary like this:
a = {'values': [{'silver': '10'}, {'gold': '50'}]}
Now I would like to check if the key 'silver' is in the dictionary:
if 'silver' in a['values']:
But I receive the error:
NameError: name 'silver' is not defined
So how can I achieve that in python?