1>>> dicts = [
2 { "name": "Tom", "age": 10 },
3 { "name": "Mark", "age": 5 },
4 { "name": "Pam", "age": 7 },
5 { "name": "Dick", "age": 12 }
6 ]
7>>> next(item for item in dicts if item["name"] == "Pam")
8{'age': 7, 'name': 'Pam'}
9
10# WITH DEFAULT VALUE TO None if None
11next((item for item in dicts if item["name"] == "pam"), None)