string to list

Chris Rebert clp2 at rebertia.com
Wed Jun 13 22:53:44 EDT 2012


n Wed, Jun 13, 2012 at 7:29 PM, bruce g <bruceg113355 at 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



More information about the Python-list mailing list