How to concatenate list members

Ruediger Maehl ruediger.maehl_nospam at web.de
Thu May 30 08:24:07 EDT 2002


"holger krekel" <pyth at devel.trillke.net> wrote
> 1) "sep".join(somelist)
>
>    joins all objects in somelist (but the objects must of string-type!)
>
> 2) "sep".join(map(str, somelist))
>
>    joins the string-representations of all objects in somelist
>
> regards,
>
>     holger

Thanks a lot, I will use 2)

Rüdiger





More information about the Python-list mailing list