numbers to string

David Isaac aisaac0 at verizon.net
Tue Oct 24 22:42:32 EDT 2006


>>> y
[116, 114, 121, 32, 116, 104, 105, 115]
>>> z=''.join(chr(yi) for yi in y)
>>> z
'try this'

What is an efficient way to do this if y is much longer?
(A numpy solution is fine.)

Thanks,
Alan Isaac





More information about the Python-list mailing list