Below i have a string which represents a single row pulled from a csv file. Each column is separated by a comma and the value is wrapped in \"\". What is the simplest way to
Python has a module for that:
http://docs.python.org/library/csv.html
import csv, sys filename = 'some.csv' with open(filename, 'rb') as f: reader = csv.reader(f) try: for row in reader: print row except csv.Error, e: sys.exit('file %s, line %d: %s' % (filename, reader.line_num, e))