for layer0 in dicts:
    for k1, layer1 in layer0.items():
        for k2, layer2 in layer1.items():
            for k3, count in layer2.items():
                combined[k1][k2][k3] += count
return combined
Python: Sum the Values of Three Layer Dictionaries