import re
string = 'i think New Roman"=== stdout ===>but I don\'t he=Command exited with status 0"Arial">fun stuff'
string = re.sub('Command exited with status 0', '', string)
string = re.sub('=== stdout ===', '', string)
print(string)
import re
string = 'i think New Roman"=== stdout ===>but I don\'t he=Command exited with status 0"Arial">fun stuff'
string = re.sub('Command exited with status 0', '', string)
string = re.sub('=== stdout ===', '', string)
print(string)
使用'string=回复sub('===stdout==','',string)'将所需的文本进行无意义的细分('')。下面是一些示例代码:
记住在字符串中使用“\”而不是仅仅使用“\”
使用'string=回复sub('===stdout==','',string)'将所需的文本进行无意义的细分('')。下面是一些示例代码:
记住在字符串中使用“\”而不是仅仅使用“\”
相关问题 更多 >
编程相关推荐