How can I split this up leaving the comma in quotes as one whole list item, I have tried to use the csv module, but can't work it out.
import csv
example = 'John, "30 Oak crescent, oakley", 30, car'
line = csv.reader(example)
print(line)
but the result is the memory address of the reader object, so I can't even explore the csv module as I can't get a list out of the object.
list(line)
separates line into a list of individual characters.
required outcome:
['John', '30 Oak crescent, oakley', 30, 'car']
There is an answer for this using python2, but not for python3 and I can't get it to translate.