位置: 编程技术 - 正文
推荐整理分享python去掉行尾的换行符方法(python去掉末尾的换行符),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:python怎么去掉末尾标点符号,python去除末尾\n,python怎么去掉末尾逗号,python去掉行尾的回车符,python怎么去掉末尾逗号,python 去掉尾部字符,python去掉行尾的换行符,python 去掉尾部字符,内容如对您有帮助,希望把文章链接给更多的朋友!
如下所示:
mystring.strip().replace(' ', '').replace('n', '').replace('t', '').replace('r', '').strip()
标签: python去掉末尾的换行符
本文链接地址:https://www.jiuchutong.com/biancheng/382401.html 转载请保留说明!友情链接: 武汉网站建设