📜  合并字典列表 python 代码示例

📅  最后修改于: 2022-03-11 14:47:18.304000             🧑  作者: Mango

代码示例2
>>> from collections import ChainMap
>>> a = [{'a':1},{'b':2},{'c':1},{'d':2}]
>>> dict(ChainMap(*a))
{'b': 2, 'c': 1, 'a': 1, 'd': 2}