title: Python: calculate value for each pair of values in list
body: <p>I have a dictionary consisting of key:[list] in which the list is a fixed and even number of binary values, ie:</p>
  
  <pre><code>{'a':[0,1,1,0,0,1],'b':[1,1,1,0,0,0]}
  </code></pre>
  
  <p>For each key, I need to return a new value for each <em>pair</em> of values in the original dict, such that for pair(1,1) = 3, pair(0,1) = 2, pair(1,0) = 1, pair(0,0) = 0.</p>
  
  <p>For the example above, output would be:</p>
  
  <pre><code>{'a':[2,1,2],'b':[3,1,0]}
  </code></pre>
  
  <p>New to both python and programming in general, and haven't found what I'm looking for on SO.  Suggestions appreciated.</p>