Read CSV file into lists
examples/csv/read_csv.py
import sys import csv if len(sys.argv) != 2: sys.stderr.write("Usage: {} FILENAME\n".format(sys.argv[0])) exit() filename = sys.argv[1] with open(filename) as fh: rd = csv.reader(fh) for row in rd: print(row)
python examples/csv/read_csv.py example/snowwhite.csv