擅长:python、mysql、java
<p>我将使用<code>collections</code>中的<a href="https://docs.python.org/3/library/collections.html#collections.Counter" rel="noreferrer">^{<cd1>}</a>来完成此操作。在</p>
<pre><code>from collections import Counter
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}
c = Counter()
for d in (d1, d2, d3):
c.update(d)
print(c)
</code></pre>
<p>输出:</p>
^{pr2}$