Answers for "merged all dictionaries in a list python"

1

merged all dictionaries in a list python

>>> result = {}
>>> for d in L:
...    result.update(d)
... 
>>> result
{'a':1,'c':1,'b':2,'d':2}
Posted by: Guest on August-03-2020

Code answers related to "merged all dictionaries in a list python"

Python Answers by Framework

Browse Popular Code Answers by Language