更新时间:2023-12-03 21:23:16
只需调用
simply call str.strip on each line as you process them:
str.strip
score=[] for eachLine in file: student = eachLine.strip().split(',') score.append(student) print(score)
从python BeautifulSoup的输出中删除新行'\ n'
从CSV文件中删除重复的行,而无需写入新文件
从CSV移除新行\ n阅读
从CSV文件中删除重复的行,而无需编写新文件