convert a list to a string?
Anthony Liu
antonyliu2002 at yahoo.com
Thu Mar 3 22:15:05 EST 2005
Oh, yes, that's a cool function! I did that before but
have forgotten.
Thanks a lot!
--- Tony Meyer <t-meyer at ihug.co.nz> wrote:
> > Suppose I have a list
> >
> > myList = ["this", "is", "a", "sample", "list"]
> >
> > If I don't want to iterate through it and
> concatenate
> > the list elements, how do I easily convert it to a
> > string like
> >
> > "this is a sample list"
>
> " ".join(myList)
>
> =Tony.Meyer
>
>
__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/
More information about the Python-list
mailing list