标签:adl imp int \n open 去掉 file bsp color
import os file=‘bsw.txt‘ f=open(file,‘r‘) ff=f.readlines() for line in ff: line=line.rstrip("\n") print line
【python读取文件时如何去掉'\n'
原文地址:https://www.cnblogs.com/bashaowei/p/8868441.html