Write a program that reads a string representing an XML document from input and outputs two numbers: the number of child elements of the root element and the number of attributes the root element has. These numbers should be printed in one line and be separated by a space.
XML in Python
How much information?
Report a typo
Sample Input 1:
<a attr="123"><b>hello</b><c/></a>Sample Output 1:
2 1Write a program in Python 3
from lxml import etree
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.