I have added multiple lists to a csv with the following code:
with open(r'my\file\path.csv', 'w', newline='') as f:
spamwriter = csv.writer(f, delimiter=',', quotechar='|', quoting=csv.QUOTE_MINIMAL)
data = list(zip(First_Name, Last_Name, Emails, Phones, Status))
for row in data:
row = list(row)
spamwriter.writerow(row)
However, the csv doesn't contain the headers:
['First_Name', 'Last_Name', 'Emails', 'Phones', 'Status']
How do I get the headers in the first row of the CSV? I need them to do some logic about which email addresses to send to.