Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

writerows to existing csv python

import sys 
import os
import csv

listOfLines= [['name@domain.com', 'name@domain.com', 'name@domain.com', 'name@domain.com', 'name@domain.com', 'name@domain.com']]

def write_to_csv(list_of_emails):
   with open('emails.csv', 'w', newline='') as csvfile:
       writer = csv.writer(csvfile, delimiter = ',')
       writer.writerows(list_of_emails)

write_to_csv(listOfLines)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #writerows #existing #csv #python
ADD COMMENT
Topic
Name
1+8 =