How Do The Below Two Packages Vary According To Usage?
What is the difference between in using them for importing as packages both of them contains ElementTree.py program in the library import xml.etree.ElementTree as etree from eleme
Solution 1:
xml.etree.ElementTree
is part of the Python standard library since Python 2.5: https://docs.python.org/2/library/xml.etree.elementtree.html.
For from elementtree import ElementTree as etree
to work, you have to install ElementTree separately. This was once necessary if you needed to use the library with older versions of Python (see http://effbot.org/zone/element-index.htm). With Python 2.7, there is no reason to do this.
So forget about elementtree.ElementTree
and use only xml.etree.ElementTree
.
Post a Comment for "How Do The Below Two Packages Vary According To Usage?"