Python兩個字典合併

d1={'a':'b','c':'d'}
d2={'e':'f'}
d=dict(d,**f)

結果:

d={'c': 'd', 'a': 'b', 'e': 'f'}

posted @ 2015-03-18 09:56  testlife  阅读(117)  评论(0)    收藏  举报