标签: python tabs
I am looking for a sign that can untab a line:
\t
\n
How do I untab a line (-1 tab)? Is there a way to do it?
答案 0 :(得分:0)
没有这样的特殊字符来“取消”一行。如果要修改字符串并仅删除一个标签,可以使用str.replace:
str.replace
mystring = mystring.replace('\t', '', 1)