In [1]: import xml.etree.ElementTree as ETIn [2]: xmlstr= ...: """ ...: <A> ...: <B>some text</B> ...: <B>other text</B> ...: <B>more text</B> ...: </A> ...: """In [3]: tree=ET.fromstring(xmlstr)In [4]: tree.remove(tree.findall('.//B')[1])


