pętla nad Dict Python szuka meczu na liście
list_of_dict = [{'a': 1, 'b': 5,
'c': 3,
'd': 6}, {'a': 3,
'f': 2,
'g': 1,
'h': 3,
'i': 5,
'j': 3}]
list_to_match = ['a', 'f', 'x']
d = {}
for match in list_to_match:
for ld in list_of_dict:
d.setdefault(match, []).append(ld.get(match, 0))
print(d)
Hungry Hamster