有没有用于文本清理的python模块?
我发现自己正在处理许多格式不良的字符串,这些字符串有双空格、制表符、点前的单空格、尾随空格等。有没有可以美化文本的东西,我可以安装和导入?例子:
\t\t\r\t \n \n I find myself
dealing with a lot of poorly formatted
strings that have double spaces, tabs,single spaces
before dots , trailing
spaces and so on. \t Is there something
that prettifies text that I can just install and import ? \t
Example: \t
I find myself dealing with a lot of poorly formatted strings that have double spaces, tabs, single spaces before dots, trailing spaces and so on. Is there something that prettifies text that I can just install and import? Example:
\t\t\r\t \n \n I find myself
dealing with a lot of poorly formatted
strings that have double spaces, tabs,single spaces
before dots , trailing
spaces and so on. \t Is there something
that prettifies text that I can just install and import ? \t
Example: \t
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查此脚本 Change.py 调用它,如下所示:
check this script Change.py calling it like: