SyntaxFix
Write A Post
Hire A Developer
Questions
A simple readable version is
def find(lst, key, value): for i, dic in enumerate(lst): if dic[key] == value: return i return -1