我在合并字典方面遇到了问题。由于代码很多,所以我将在示例中展示我的问题。
d1 = {'the':3, 'fine':4, 'word':2}
+
d2 = {'the':2, 'fine':4, 'word':1, 'knight':1, 'orange':1}
+
d3 = {'the':5, 'fine':8, 'word':3, 'sequel':1, 'jimbo':1}
=
finald = {'the':10, 'fine':16, 'word':6, 'knight':1, 'orange':1, 'sequel':1, 'jimbo':1}
正在为词云准备字数统计。我不知道如何连接键的值,这对我来说是一个难题。请帮助我。 最好的祝福