title: create a key- value pair in a for loop using python and update the value
body: <p>I am new to python and learning the stuff from scratch. One thing I want to do, but couldn't find out how is to create a key-value pair list using the for loop and update just the value. A sample code is:</p>
  
  <pre><code>for i in range(0,6)
    #####some code that gives an output integer x.
    print(i,x)
  </code></pre>
  
  <p>The integer x is different for each i.  How do I create a list like {0:x0,1:x1,2:x2,3:x3,4:x4,5:x5}, using the for loop?</p>