1import csv
2
3with open('file.csv', newline='') as f:
4 reader = csv.reader(f)
5 data = list(reader)
6
7print(data)
8
1# Convert a list into rows for a column in csv
2
3import csv
4for_example = [1, 2, 3, 4, 5, 6]
5with open('output.csv', 'w', newline='') as csv_1:
6 csv_out = csv.writer(csv_1)
7 csv_out.writerows([for_example[index]] for index in range(0, len(for_example)))
8