언어&플랫폼/python 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

'언어&플랫폼 > python' 카테고리의 다른 글

[python] time 관련  (0) 2015.01.06
shell과 pipe 실행하기(subprocess)  (0) 2014.03.21
[python] 띄어쓰기 제거  (0) 2013.12.10
[python] json decode  (0) 2013.12.10
Tutorial  (0) 2013.12.10
posted by cozyboy
: