programming-examples/python/Dictionary/Python script to merge two Python dictionaries.py
2019-11-15 12:59:38 +01:00

5 lines
101 B
Python

d1 = {'a': 100, 'b': 200}
d2 = {'x': 300, 'y': 200}
d = d1.copy()
d.update(d2)
print(d)