是否可以將變量傳遞給@name屬性? import xml.etree.ElementTree as ET
tree = ET.parse('C:/test.xml')
root = tree.getroot()
somelist = [x.text for x in root.findall(".//actionList[@name='VARIABLEHEREinsteadoftext'
我有段落的數據框,我已將(*可以)分成單詞標記和句子標記,並期望找到所有在出現短語:「貢獻」或「捐獻給」的任何情況下的名詞短語。 還是真的某種形式的,所以: "Contributions are welcome to be made to the charity of your choice."
---> would return: "the charity of your choice"