Well, in your case, your dict variable is not a dictionary, it is a list of 3 dictionaries, each of which contains 2 keys (text and value). Note that I suggested that either the value is a variable or z that you forgot the quotes around it (I added them here)
[{'text': 'second value', 'value': 'number 2'}, {'text': 'third value', 'value': 'number 3'}, {'text': 'first value', 'value': 'number 1'}]
If this is what you expected, then you can use something like:
mySetOfValues=set([x['value'] for x in my_dict_list]) for r in results: if r in mySetOfValues: print 'ok'
However, if I understood correctly, perhaps you wanted to create a dictionnary by matching the first value with number 1?
Bruce source share