removing duplicates, or, converting Set() to string

John Machin sjmachin at lexicon.net
Wed Jul 26 20:26:14 EDT 2006


Simon Forman wrote:

>
> Do ','.join(clean) to make a single string with commas between the
> items in the set.  (If the items aren't all strings, you'll need to
> convert them to strings first.)
>

And if the items themselves could contain commas, or quote characters,
you might like to look at the csv module.




More information about the Python-list mailing list