You can use lambda with filter .
>>> fileList = [{"fileName": "filename1.typ", "fileMod": "0000000001"}, {"fileName": "filename2.typ", "fileMod": "0000000002"}] >>> filter(lambda x:x["fileName"]=="filename2.typ",fileList)[0]['fileMod'] '0000000002'
You can also do this using List-Comprehension
[x['fileMod'] for x in fileList if x["fileName"]=="filename2.typ"][0]
Or just a simple iteration
for x in fileList: if x["fileName"]=="filename2.typ": print x["fileMod"]
source share