fast way of turning a list of integers<256 into a string
andrew at indranet.co.nz
Tue Jan 14 00:00:22 CET 2003
--On Monday, January 13, 2003 14:44:51 -0800 "Jonathan P."
<jbperez808 at yahoo.com> wrote:
> for i in range(1,255):
> has horrible performance (primarily due to string
> immutability I think). Is there a function to do
> the ff. instead:
> and have x become a string?
''.join(map(chr, range(1,255))) is pretty fast, as is
I haven't profiled to see which is faster.
More information about the Python-list