Merge two dicts; if key in both, keep the sum. Example: {'a':1,'b':2}, {'b':3,'c':4} => {'a':1,'b':5,'c':4}
Implement this function:
def interleave_dicts(d1: dict, d2: dict) -> dict:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: d1, d2.
Input
{'a': 1, 'b': 2}
{'b': 3, 'c': 4}
Output
{'a': 1, 'b': 5, 'c': 4}