Berthold Höllmann wrote:
> Francois De Serres <[EMAIL PROTECTED]> writes:
>
>> hiho,
>>
>> what's the clean way to translate the tuple (0x73, 0x70, 0x61, 0x6D)
>> to the string 'spam'?
>
> .>>> t = (0x73, 0x70, 0x61, 0x6D)
> .>>> ''.join('%c' % c for c in t)
> 'spam'
Or:
t = (0x73, 0x70, 0x61, 0x6D)
('%c' * len(t)) % t
Reinhold
--
http://mail.python.org/mailman/listinfo/python-list
