I have 5 lists, all of the same length, and I\'d like to write them to 5 columns in a CSV. So far, I can only write one to a column with this code:
with open
I just wanted to add to this one- because quite frankly, I banged my head against it for a while - and while very new to python - perhaps it will help someone else out.
writer.writerow(("ColName1", "ColName2", "ColName"))
for i in range(len(first_col_list)):
writer.writerow((first_col_list[i], second_col_list[i], third_col_list[i]))