ReXX Style translate() function for strings ?
Greg Ewing
greg at cosc.canterbury.ac.nz
Thu Nov 1 21:56:46 EST 2001
Stephen Ferg wrote:
>
> input = ""
> for n in xrange(256): # produce numbers 0 through 255
> input = input + chr(n)
or, for a faster way of doing that,
input = ''.join(range(256))
--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list