Created
December 30, 2013 20:14
-
-
Save pudquick/8187480 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def match_dict(list_of_dicts_to_search, matching_dict): | |
for a_dict in list_of_dicts_to_search: | |
if all(map(lambda x: a_dict.get(x[0], None) == x[1], matching_dict.items())): | |
return a_dict | |
return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment