如何修剪空白?

夙愿已清 提交于 2020-08-14 13:08:28

问题:

Is there a Python function that will trim whitespace (spaces and tabs) from a string? 是否有Python函数可以从字符串中修剪空白(空格和制表符)?

Example: \\t example string\\texample string 示例: \\t example string\\texample string


解决方案:

参考一: https://stackoom.com/question/4yPM/如何修剪空白
参考二: https://oldbug.net/q/4yPM/How-do-I-trim-whitespace
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!