title: What is the difference between dictionaries created from vars() and dict={}?
body: <p>After reading about vars(), I am still a little confused on what it is actually doing. In looking at the Python documentation, "The vars() function returns the __ dict __ attribute of the given object if the object has __ dict __ attribute." So, it returns a dictionary object? Here are the questions I am really getting at:</p>
  
  <p>1) What is vars() actually doing in the below code? </p>
  
  <pre><code>dict = {}
  dict['H'] = atom
  vars()[dict['H']] = 20
  </code></pre>
  
  <p>2) Why is the vars() necessary in front of the dictionary I created and could I leave it out? (I know the code fails if I leave it out, but what would be a different way of accomplishing the same task?) </p>
  
  <pre><code>dict = {}
  dict['H'] = atom
  dict['H'] = 20
  </code></pre>