title: Python dictionary simple way to add a new key value pair
body: <p>Say you have,</p>
  
  <pre><code>foo = 'bar'
  d = {'a-key':'a-value'}
  </code></pre>
  
  <p>And you want</p>
  
  <pre><code>d = {'a-key':'a-value','foo':'bar'}
  e = {'foo':foo}
  </code></pre>
  
  <p>I know you can do,</p>
  
  <pre><code>d['foo'] = foo
  
  #Either of the following for e
  e = {'foo':foo}
  e = dict(foo=foo)
  </code></pre>
  
  <p>But, in all these way to add the variable foo to dict, I have had to use the word <code>foo</code> twice; once to indicate the key and once for its value. </p>
  
  <p>It seems wasteful to me to use <code>foo</code> twice. Is there a simpler way, in which you can tell python <strong>"Add this variable to the dictionary with its name as the key and its value as the value"</strong>?</p>