title: reduce python dictionary values if key meets condition
body: <p>I have a python dictionary with string keys, integer values.  I want to find the sum of values if the key is not '?'.  I can find the sum using a for loop like this. </p>
  
  <pre><code>d = {'a':20, 'b': 20, '?': 10}
  sum = 0
  for k in d.keys():
      if k != '?':
          sum += d[k]
  print "This is my sum: " + sum
  </code></pre>
  
  <p>For ambition's sake only, I would really like to refactor that into a reduce() function.  I took a stab at it:</p>
  
  <pre><code>sum = reduce(lambda s, k: s if k == '?' else s += d[k], d.keys())
  </code></pre>
  
  <p>but I don't really know what I'm doing.  I'm sure someone with better functional chops than I can do this in minutes.  Help me out?</p>