title: Simultaneously replacing all values of a dictionary to zero python
body: <p>I have a very large dictionary, maybe about <code>10,000 keys/values</code> and I want to simultaneously change all values to <code>0</code>. I am aware that I can loop through and set all the values to <code>0</code> but it take forever. Is there anyway that I can <em>simultaneously</em> set <strong>all</strong> values to <code>0</code>?</p>
  <p>Looping method, very slow:</p>
  <pre><code># example dictionary
  a = {'a': 1, 'c': 1, 'b': 1, 'e': 1, 'd': 1, 'g': 1, 'f': 1, 'i': 1, 'h': 1, 'k': 1,
   'j': 1, 'm': 1, 'l': 1, 'o': 1, 'n': 1, 'q': 1, 'p': 1, 's': 1, 'r': 1, 'u': 1,
   't': 1, 'w': 1, 'v': 1, 'y': 1, 'x': 1, 'z': 1}
  for key, value in a.items():
      a[key] = 0
  </code></pre>
  <p>Output:</p>
  <pre><code>{'a': 0, 'c': 0, 'b': 0, 'e': 0, 'd': 0, 'g': 0, 'f': 0, 'i': 0, 'h': 0, 'k': 0,
   'j': 0, 'm': 0, 'l': 0, 'o': 0, 'n': 0, 'q': 0, 'p': 0, 's': 0, 'r': 0, 'u': 0,
   't': 0, 'w': 0, 'v': 0, 'y': 0, 'x': 0, 'z': 0}
  </code></pre>