maping two-digit integers to a single ascii character, inverse of ord()?

Jeff Kowalczyk jtk at yahoo.com
Thu Aug 22 14:16:31 EDT 2002


I have a device that stores ascii characters. I need to normalize the
storage of integers from 0 to about 45 or so as a single character.

What is the most efficient way to map integers of one and two digits into a
single ascii  (any of 128 chars) alphanumeric character digit?

Is there an inverse function of ord()?

Thanks.









More information about the Python-list mailing list