title: How to keep adding values at end of dictionary
body: <p>I learnt python yesterday. I'm trying to parse an XML File and put the values in a dictionary. </p>
  
  <pre><code>xml.etree.ElementTree as ET
  tree = ET.parse('test.xml')
  root = tree.getroot()
  d ={ }
  for child in root:
     d[child.tag] = child.attrib
     print child.tag, child.attrib
     print("\n")
  for k,v in d.items():
     print(k,v)
  </code></pre>
  
  <p>Now the statement <code>d[child.tag] = child.attrib</code> is being rewritten everytime instead of being updated. </p>
  
  <p>So the output i'm getting is -- </p>
  
  <pre><code>country {'name': 'Liechtenstein'}
  country {'name': 'Singapore'}
  country {'name': 'Panama'}
  
  ('country', {'name': 'Panama'})
  </code></pre>
  
  <p>The first three lines of output are due to the <code>print()</code>. The last line is coming from dictionary. </p>
  
  <p>How can i do this efficiently so that my dictionary stores all the three lines?</p>