how to add two dictionaries from a two different list in a order using python? code example
Example 1: merge two dict python 3
z = {**x, **y}
Example 2: merge a list of dictionaries python
>>> from collections import ChainMap
>>> a = [{'a':1},{'b':2},{'c':1},{'d':2}]
>>> dict(ChainMap(*a))
{'b': 2, 'c': 1, 'a': 1, 'd': 2}