title: Average value in multiple dictionaries based on key in Python?
body: <p>I have three dictionaries (or more):</p>
  
  <pre><code>A = {'a':1,'b':2,'c':3,'d':4,'e':5}
  B = {'b':1,'c':2,'d':3,'e':4,'f':5}
  C = {'c':1,'d':2,'e':3,'f':4,'g':5}
  </code></pre>
  
  <p>How can I get a dictionary of the average values of every key in the three dictionaries?</p>
  
  <p>For example, given the above dictionaries, the output would be:</p>
  
  <pre><code>{'a':1/1, 'b':(2+1)/2, 'c':(3+2+1)/3, 'd':(4+3+2)/3, 'e':(5+4+3)/3, 'f':(5+4)/2, 'g':5/1}
  </code></pre>