title: Python 2.7.16 - ImportError: No module named etree.ElementTree
body: <p>I am making a script to perform creating and writing data to XML file. The error is no module no module name</p>
  
  <p>I refer to this stackoverflow link, <a href="https://stackoverflow.com/questions/3073033/python-2-5-4-importerror-no-module-named-etree-elementtree">Python 2.5.4 - ImportError: No module named etree.ElementTree</a>. I refer to this tutorial, <a href="https://stackabuse.com/reading-and-writing-xml-files-in-python/" rel="nofollow noreferrer">https://stackabuse.com/reading-and-writing-xml-files-in-python/</a>. I still do not understand on what is the solution. I tried to replace </p>
  
  <p>"from elementtree import ElementTree"</p>
  
  <p>to</p>
  
  <p>"from xml.etree import ElementTree"</p>
  
  <p>It still did not work.</p>
  
  <pre><code>#!/usr/bin/python
  import xml.etree.ElementTree as xml
  root = xml.Element("FOLDER")
  
  child = xml.Element("File")
  
  root.append(child)
  
  fn = xml.SubElement(child, "PICTURE")
  fn.text = "he32dh32rf43hd23"
  md5 = xml.SubElement(child, "CONTENT")
  md5.text = "he32dh32rf43hd23"
  
  tree = xml.ElementTree(root)
  with open(xml.xml, "w") as fh:
     tree.write(fh)
  </code></pre>
  
  <p>"""
  I expect the result to be that data is written to xml file. But I received an error shown below,</p>
  
  <pre><code>  File "./xml.py", line 2, in &lt;module&gt;
      import xml.etree.ElementTree as xml
    File "/root/Desktop/virustotal/testxml/xml.py", line 2, in &lt;module&gt;
      import xml.etree.ElementTree as xml
  ```ImportError: No module named etree.ElementTree
  </code></pre>