有两个字典
d1 = {"foo": 3, "baz": -1, "bar": 5}
d2 = {"foo": 4, "ven": 10, "bar": 5}
对键进行full join全连接,对值进行right join右连接,即:需要从d1中找出d2中没有的键值对,添加到d2中
d_1_2 = dict(list(d1.items()) + list(d2.items()))
有两个字典
d1 = {"foo": 3, "baz": -1, "bar": 5}
d2 = {"foo": 4, "ven": 10, "bar": 5}
对键进行full join全连接,对值进行right join右连接,即:需要从d1中找出d2中没有的键值对,添加到d2中
d_1_2 = dict(list(d1.items()) + list(d2.items()))