Merge values of two Python dictionaries by keys

后端 未结 0 1773
南旧
南旧 2021-01-04 10:11

I want to merge the values of two dictionaries by their keys. Example:

d1 = {\'a\':1, \'b\':2, \'c\':3}
d2 = {\'a\':2, \'b\':[2,3], \'d\':3}

desired_output =         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题