📜  组合字典列表 - Python 代码示例

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

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