Amend a csv file in Python

前端 未结 1 1146
孤街浪徒
孤街浪徒 2020-12-12 03:37

So I have a CSV file with a bunch on IP\'s in it:

192.168.0.1,192.168.0.2,192.168.0.3,192.168.0.4,192.168.0.5,192.168.0.6,192.168.0.7,192.168.0.8,192.168.0.9         


        
相关标签:
1条回答
  • 2020-12-12 04:23

    Why don't you just append a new row?

    fd = open('file.csv','a')
    fd.write(yourCsvRowWithNewIP)
    fd.close()
    
    0 讨论(0)
提交回复
热议问题