title: XML Attributes printing backwards in python
body: <p>When I get a printout of the XML file using this code, it prints backward as shown below.</p>
  <pre><code>
  import os
  import xml.etree.cElementTree as ET
  import pprint
  
  data_directory = os.environ.get('')
  
  
  def taxRules():
      fileName = '/taxRules.xml'
      tree = ET.parse(data_directory + fileName)
      root = tree.getroot()
  
      data_list = []
  
      for child in root.iter(&quot;taxRule&quot;):
          data = child.attrib.copy()
  
         # data['status'] = (data['status'])
         # data['rate'] = float(data['rate'])
         # data['range1'] = float(data['range1'])
          data_list.append(data)
  
      return data_list
  
  
  if __name__ == '__main__':
      results = taxRules()
      pprint.pprint(results)
  
  </code></pre>
  <p>this is the printout but its suppose to print out
  status, rate, range1, range2</p>
  <p>Any idea how I can get it to print out exactly how it shown in the XML file?</p>
  <p>I'm using python 3.8</p>
  <pre><code>
  [{'range1': '0', 'range2': '9950', 'rate': '0.1', 'status': 's'},
   {'range1': '9950', 'range2': '40525', 'rate': '0.12', 'status': 's'},
   {'range1': '40525', 'range2': '86375', 'rate': '0.22', 'status': 's'},
   {'range1': '86375', 'range2': '164925', 'rate': '0.24', 'status': 's'},
   {'range1': '164925', 'range2': '209425', 'rate': '0.32', 'status': 's'},
   {'range1': '209425', 'range2': '523600', 'rate': '0.35', 'status': 's'},
   {'range1': '523600', 'range2': 'max', 'rate': '0.37', 'status': 's'},
   {'range1': '0', 'range2': '19900', 'rate': '0.1', 'status': 'mfj'},
   {'range1': '19900', 'range2': '81050', 'rate': '0.12', 'status': 'mfj'},
   {'range1': '81050', 'range2': '172750', 'rate': '0.22', 'status': 'mfj'},
   {'range1': '172750', 'range2': '329850', 'rate': '0.24', 'status': 'mfj'},
   {'range1': '329850', 'range2': '418850', 'rate': '0.32', 'status': 'mfj'},
   {'range1': '418850', 'range2': '628300', 'rate': '0.35', 'status': 'mfj'},
   {'range1': '628300', 'range2': 'max', 'rate': '0.37', 'status': 'mfj'},
   {'range1': '0', 'range2': '14200', 'rate': '0.1', 'status': 'hh'},
   {'range1': '14200', 'range2': '54200', 'rate': '0.12', 'status': 'hh'},
   {'range1': '54200', 'range2': '86350', 'rate': '0.22', 'status': 'hh'},
   {'range1': '86350', 'range2': '164900', 'rate': '0.24', 'status': 'hh'},
   {'range1': '164900', 'range2': '209400', 'rate': '0.32', 'status': 'hh'},
   {'range1': '209400', 'range2': '523600', 'rate': '0.35', 'status': 'hh'},
   {'range1': '523600', 'range2': 'max', 'rate': '0.37', 'status': 'hh'}]
  
  </code></pre>