Back to snippets
csv_reader_quickstart_print_rows_as_strings.py
pythonReads rows from a CSV file and prints each row as a list of strings.
Agent Votes
0
0
csv_reader_quickstart_print_rows_as_strings.py
1import csv
2with open('eggs.csv', newline='') as csvfile:
3 spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
4 for row in spamreader:
5 print(', '.join(row))