是否有一个Python函数可以从字符串中修剪空格(空格和制表符)?
示例:\t example string\t→example string
\t example string\t
example string
python string whitespace trim strip
我正在努力使用.strip和以下代码行.
谢谢您的帮助.
f.write(re.split("Tech ID:|Name:|Account #:",line)[-1])
python
python ×2
string ×1
strip ×1
trim ×1
whitespace ×1