i need if condition to detect whether it is last element of the column in csv file to not add “,” /pyhton

前端 未结 0 906
慢半拍i
慢半拍i 2020-12-14 05:56
f=open(\'students.csv\', \'r\') 
a=f.readline() 
length=len(a.split(","))
fw=open(\'output.csv\', \'w\')
lst = []
while a: 
   lst.append(a)
   a=f.readlin         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题