📜  从 python 代码示例中的字符串中删除制表符空间

📅  最后修改于: 2022-03-11 14:45:47.416000             🧑  作者: Mango

代码示例1
import re

mystr = "I want to Remove all white \t spaces, new lines \n and tabs \t"
print re.sub(r"\W", "", mystr)

Output : IwanttoRemoveallwhitespacesnewlinesandtabs