title: Summing List of values with similar keys to dictionary
body: <p>How can I take a list of values (percentages):  </p>
  
  <pre><code>example = [(1,100), (1,50), (2,50), (1,100), (3,100), (2,50), (3,50)]
  </code></pre>
  
  <p>and return a dictionary:  </p>
  
  <pre><code>example_dict = {1:250, 2:100, 3:150}
  </code></pre>
  
  <p>and recalculate by dividing by sum(example_dict.values())/100:  </p>
  
  <pre><code>final_dict = {1:50, 2:20, 3:30}  
  </code></pre>
  
  <p>The methods I have tried for mapping the list of values to a dictionary results in values being iterated over rather than summed.</p>
  
  <hr>
  
  <p><strong>Edit:</strong>
  Since it was asked here are some attempts (after just writing over old values) that went no where and demonstrate my 'noviceness' with python:  </p>
  
  <pre><code>{k: +=v if k==w[x][0] for x in range(0,len(w),1)}
  </code></pre>
  
  <p>invalid</p>
  
  <pre><code>for i in w[x][0] in range(0,len(w),1):
      for item in r:
          +=v  (don't where I was going on that one)
  </code></pre>
  
  <p>invalid again.</p>
  
  <p>another similar one that was invalid, nothing on google, then to SO.</p>