When I run this input (saved as variable 'line'):
xsc_i,202,"House of Night",21,"/21_202"
through a csv reader:
for row in csv.reader(line):
print row
it splits the strings, not just the fields
['x']
['s']
['c']
['_']
['i']
['', '']
['2']
['0']
['2']
['', '']
etc.
It exhibits this behavior even if I explicitly set the delimiter:
csv.reader(line, delimiter=",")
It's treating even strings as arrays, but I can't figure out why, and I can't just split on commas because many commas are inside "" strings in the input.
Python 2.7, if it matters.