Filtering out non-readable characters

Peter Hansen peter at engcorp.com
Sun Jul 17 01:01:50 CEST 2005


George Sakkis wrote:
> "Bengt Richter" <bokr at oz.net> wrote:
>> >>> identity = ''.join([chr(i) for i in xrange(256)])
> 
> Or equivalently:
>>>>identity = string.maketrans('','')

Wow!  That's handy, not to mention undocumented.  (At least in the 
string module docs.)  Where did you learn that, George?

-Peter



More information about the Python-list mailing list