tuple to string?

Francois De Serres fdeserres at gmx.net
Sun Jul 24 06:25:45 EDT 2005


Francois De Serres wrote:

>hiho,
>
>what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D) to 
>the string 'spam'?
>
>TIA,
>Francois
>  
>
thanks to all!

I'll pick ('%c' * len(t)) % t, for it's readability and the fact that 
join() is on the deprec'd list.

Francois




More information about the Python-list mailing list