title: How to use the value of a variable as key when constructing a dictionary
body: <p>In Python , I want to make a dictionary using a formula in a loop.</p>
  
  <p>My problem is that this code:</p>
  
  <pre><code>i = 1
  A = {}
  A.update(i=12)
  print(A)
  </code></pre>
  
  <p>gives me <code>{'i': 12}</code>， while I want to get <code>{1: 12}</code>, with the value of <code>i</code> as key instead of its name. 
  How can I achieve that?</p>