Anthony Liu <[EMAIL PROTECTED]> 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"

You want:

>>> myList = ["this", "is", "a", "sample", "list"]
>>> " ".join (myList)
'this is a sample list'
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to