1import sys
2import os
3import csv
4
5listOfLines= [['name@domain.com', 'name@domain.com', 'name@domain.com', 'name@domain.com', 'name@domain.com', 'name@domain.com']]
6
7def write_to_csv(list_of_emails):
8 with open('emails.csv', 'w', newline='') as csvfile:
9 writer = csv.writer(csvfile, delimiter = ',')
10 writer.writerows(list_of_emails)
11
12write_to_csv(listOfLines)
13