41
Have a list of python dictionaries in the following format. How would you do a search to find a specific name exists?
label = [{'date': datetime.datetime(2013, 6, 17, 8, 56, 24, 2347),
'name': 'Test',
'pos': 6},
{'date': datetime.datetime(2013, 6, 17, 8, 56, 24, 2347),
'name': 'Name 2',
'pos': 1}]
The following did not work:
if 'Test' in label[name]
'Test' in label.values()