Merge two dicts. If key exists in both, sum the values.
Implement this function:
def merge_two_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}