1>>> dicts = [
2... { "name": "Tom", "age": 10 },
3... { "name": "Mark", "age": 5 },
4... { "name": "Pam", "age": 7 },
5... { "name": "Dick", "age": 12 }
6... ]
7
8>>> next(item for item in dicts if item["name"] == "Pam")
9{'age': 7, 'name': 'Pam'}
10