list to string
Wayne Izatt
wayne.izatt at _nospam_myself.com
Tue Feb 27 02:16:22 EST 2001
"glen mettler" <glen.mettler at home.com> wrote in message
news:1103_983241679 at cc462845-a...
> These commands will turn a string into a list:
> myword="dog"
> mywordlist=list(myword)
> result = ["d","o","g"]
>
> is there a command/function that can take the list ["d","o","g"] and make
it a string "dog"?
>>> lst =["d", "o", "g"]
>>> lst
['d', 'o', 'g']
>>> dog = lst[0]+lst[1]+lst[2]
>>> dog
'dog'
or is there something I'm not getting?
cheers
>
> Glen
>
>
>
More information about the Python-list
mailing list