网络编程
位置:首页>> 网络编程>> Python编程>> python去掉行尾的换行符方法

python去掉行尾的换行符方法

作者:jingxian  发布时间:2021-10-24 02:36:22 

标签:python,去掉,换行符

如下所示:

mystring.strip().replace(' ', '').replace('\n', '').replace('\t', '').replace('\r', '').strip()

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com