I am very new to Python. I want to parse a csv file such that it will recognize quoted values - for example
1997,Ford,E350,\"Super, luxurious truck\"
You should use the csv module:
csv
import csv reader = csv.reader(['1997,Ford,E350,"Super, luxurious truck"'], skipinitialspace=True) for r in reader: print r
output:
['1997', 'Ford', 'E350', 'Super, luxurious truck']