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
# make sure you only commit this file and int-call-codes-full-native-names to github | |
import json | |
def get_by_attr(test_list, attr, attr_val): | |
for x in test_list: | |
if x[attr] == attr_val: | |
break | |
else: | |
x = None |