[Solved] Python – selectively add up values while iterating through dictionary of dictionaries [closed]


my_dict = {key1:{value1:value2}, key2:{value3:value4}, key3{value5:value6}, key4:{value7:value8}...}
result = []
for key1 in my_dict:
    if sum(my_dict[key1].keys() + my_dict[key1].values())==3:
        result[key1] = my_dict[key1].keys()[0]

Hope this helps

solved Python – selectively add up values while iterating through dictionary of dictionaries [closed]