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
4. We’re using a for loop to iterate over each
5. We’re using the find() method to find the
6. We’re printing the text inside the