我想知道如何删除以“saison”开头的所有单词。Python - 将所有单词替换为
对于为例:
test = "This is an example of saison1, saison7 and saison58 could be deleted too"
#test = test.replace("saison1", "")
#test = test.replace("saison58", "")
拥有:
test = "This is an example of , and could be deleted too"
如何做到这一点?
好的,谢谢。 re是一个我不再控制的模块,语法有点复杂。再次感谢 – Guillaume 2014-11-21 15:43:27