python read xml

import xml.etree.ElementTree as ET

root = ET.fromstring(country_data_as_string)

Here is what the above code is Doing:
1. We’re using the fromstring() method from the ElementTree module to parse the XML string into an Element object.
2. We’re assigning the Element object to the root variable.
3. We’re using the findall() method to find all the tags in the XML string.
4. We’re using a for loop to iterate over each tag.
5. We’re using the find() method to find the tag inside each tag.
6. We’re printing the text inside the tag.