例如,以英尺和英寸为例:我怎么能把其中的一个元素分解成这样的东西:
"the person is 5 feet 11 inches tall."feet {} inches tall.".format(list[1], list[1]) #I am aware taking the same index of list will give me 5-
我不太擅长构建正则表达式,在这个问题上我需要帮助:str= '(OS:"Windows" OR OS:"VMware") AND tags.tag.name:"test使用regex时,我希望替换str并使新字符串看起来像这样:
newStr= '(OS:"Windows" OR OS:"VMware") AND tags.tag:(name:"test") andnot se