언어&플랫폼/python
[python] dictionary 에 dictionary 붙이기
cozyboy
2013. 12. 18. 23:34
>>> dest = orig.copy()
>>> dest.update(extra)
>>> orig
{'A': 1, 'C': 3, 'B': 2}
>>> dest
{'A': 1, 'C': 3, 'B': 2, 'E': 5, 'D': 4}
[펌] : http://stackoverflow.com/questions/8930915/python-append-dictionary-to-dictionary