Converting tuple to String

Daniel Nogradi nogradi at gmail.com
Sun Apr 30 11:41:18 EDT 2006


> Is their a command to convert a tuple to string? e.g.
>
> xyz = "Hello", "There"
> print xyz
>
> Is their any way of getting print to see xyz as being one string i.e.
> "Hello There" rather than "Hello" and "There", despite "Hello" and
> "There" being, in reality, seperate?

Try

one_big_string = ''.join( xyz )
print one_big_string

Hope this helps.



More information about the Python-list mailing list