Can python's csv reader leave the quotes in?
问题 I want to use the python CSV reader but I want to leave the quotes in. That is I want: >>> s = '"simple|split"|test' >>> reader = csv.reader([s], delimiter='|', skipinitialspace=True) >>> reader.next() ['"simple|split"', 'test'] But I actually get: ['simple|split', 'test'] In my case I want the quoted string to be passed on still quoted. I know the CSV reader is working as intended and my use case is an abuse of it, but is there some way to bend it to my will? Or do I have to write my own