【发布时间】:2017-04-24 06:02:57
【问题描述】:
我在连接字典时遇到问题。有这么多代码,所以我在示例中显示我的问题是什么。
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}
它正在为 wordcloud 准备字数。我不知道如何连接键的值,这对我来说很困惑。请帮忙。 最好的问候
【问题讨论】:
-
欢迎来到Stack Overflow!请查看How to Ask 并向我们展示您的尝试!
标签: python dictionary word-cloud textedit