Search notes:

Python: dict.update()

The method update udpates a dict with the keys and values from another dict.
d1 = { 'A': 'one', 'B': 'two',              'D': 'four'}
d2 = {             'B': 'TWO', 'C':'THREE'             }

d1.update(d2)

for k, v in d1.items():
    print(f'{k} = {v}')
#
#  A = one
#  B = TWO
#  D = four
#  C = THREE
Github repository about-Python, path: /types/dict/update.py

See also

Merging two dictionaries

Index