tuple to string?

Scott David Daniels Scott.Daniels at Acm.Org
Sat Jul 23 07:43:07 EDT 2005


Steven D'Aprano wrote:
> On Fri, 22 Jul 2005 06:07:28 -0700, Robert Kern wrote:
> ... or even:
> 
>>>>''.join(map(lambda n: chr(n), (0x73, 0x70, 0x61, 0x6D)))
> 
> 'spam'

This is exactly what is wrong with lambda.  It yearns for over-use.
This last should be:

 >>>''.join(map(chr, (0x73, 0x70, 0x61, 0x6D)))

--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list