Problem in splitting a string

Terry Reedy tjreedy at udel.edu
Thu Jul 22 22:03:03 CEST 2004


"Angelo Secchi" <secchi at sssup.it> wrote in message
news:20040722201632.25d4506a.secchi at sssup.it...
>
> Hi,
> I have string of numbers and words like
>
> ',,,,,,23,,,asd,,,,,"name,surname",,,,,,,\n'
>
> and I would like to split (I'm using string.split()) it using comma as
> separator but I do not want to split in two also the "name,surname"
> field. In other word I would like python in separating fields to skip
> that particular comma.
>
> How can I do that?

I suspect that you need the csv (comma separated variable) module.

tjr






More information about the Python-list mailing list