I want to merge two dictionaries but the order doesn't need to change. Dictionary 2 needs to be "pasted" behind Dictionary 1. (or vice versa)
d1 = {'a': 100, 'b': 200}
d2 = {'x': 300, 'y': 200}
d3 = ?
print d3
>>> {'x': 300, 'y': 200, 'a': 100, 'b': 200}
I tried using the python3 way of combining dictionaries:
d1 = {'a': 100, 'b': 200}
d2 = {'x': 300, 'y': 200}
d3 = {**d1, **d2}
print(d3)
>>> {'y': 200, 'b': 200, 'a': 100, 'x': 300}
But the order is not remained. Any help?