Join strings - very simple Q.

Mike Kent mrmakent at cox.net
Fri Mar 23 15:06:58 EDT 2007


On Mar 23, 2:37 pm, Paulo da Silva <psdasil... at esotericaX.ptX> wrote:
> Hi!
>
> I was told in this NG that string is obsolet. I should use
> str methods.
>
> So, how do I join a list of strings delimited by a given
> char, let's say ','?
>
> Old way:
>
> l=['a','b','c']
> jl=string.join(l,',')
>
> New way?
>
> Thanks
> Paulo

New way:
l=['a','b','c']
jl=','.join(l)




More information about the Python-list mailing list