#import xml.etree.cElementTree as etree
#import xml.etree.cElementTree as etree
root.findall(
'country[last()]'
)
#
最后一个country,
实际上找到了所有的
country
root.findall(
'country[last()]'
)
#
最后一个country,
实际上找到了所有的
from lxml import etree
root.findall(
'country[last()]'
)
#
实际上找到了
最后一个country
root.findall(
'country[last()]'
)
#
实际上找到了
最后一个country
因此建议使用新的库