string.split(',') will give you an array. Example:
'AAA,"BBBB,CCCC,DDDD",EEE,FFF,GGG '.split(',') ['AAA', '"BBBB', 'CCCC', 'DDDD"', 'EEE', 'FFF', 'GGG'] On Wed, Jun 13, 2012 at 10:53 PM, Chris Rebert <c...@rebertia.com> wrote: > n Wed, Jun 13, 2012 at 7:29 PM, bruce g <bruceg113...@gmail.com> wrote: > > What is the best way to parse a CSV string to a list? > > Use the `csv` module: > http://docs.python.org/library/csv.html > http://www.doughellmann.com/PyMOTW/csv/ > > The `StringIO` module can be used to wrap your string as a file-like > object for consumption by the `csv` module: > http://docs.python.org/library/stringio.html > > Cheers, > Chris > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list