0
点赞
收藏
分享

微信扫一扫

python按行读取文件,去掉每行的换行符"\n"


1. for line in file.readlines():
2. =line.strip('\n')

举报

相关推荐

0 条评论