title: Several identical dictionaries component mean
body: <p>I have several Python3 dictionaries with the same identical structure, mapping string labels to real values. For example, for 4 entries, the data set could look like:</p>
  <blockquote>
  <p>{&quot;a&quot;: 1.2, &quot;b&quot;: 3.2, &quot;c&quot;:5.65}</p>
  </blockquote>
  <blockquote>
  <p>{&quot;a&quot;: 2.5, &quot;b&quot;: 3.8, &quot;c&quot;:9.65}</p>
  </blockquote>
  <blockquote>
  <p>{&quot;a&quot;: 2.8, &quot;b&quot;: 3.2, &quot;c&quot;:2.65}</p>
  </blockquote>
  <blockquote>
  <p>{&quot;a&quot;: 1.8, &quot;b&quot;: 1.2, &quot;c&quot;:3.65}</p>
  </blockquote>
  <p>I want to do a component wise average of this components, so the final result should look like:</p>
  <blockquote>
  <p>{&quot;a&quot;: 2.07, &quot;b&quot;: 2.85, &quot;c&quot;:5.4}</p>
  </blockquote>
  <p>I know how to resolve the problem using for-loops with adding up the values and divide each entry by the count at the end, like</p>
  <pre><code>def final_results(scores):
  result = {}
  for score in scores:
      for k, v in score.items():
          if k not in result:
              result[k] = v
          else:
              result[k] += v
  for k, v in result:
      result[k] = v / len(scores)
  return result
  </code></pre>
  <p>, but I'm looking for a way to solve the problem in a functional way, using lambda, map, filter etc. Is there any?</p>