Filtering out non-readable characters

Peter Hansen peter at engcorp.com
Sat Jul 16 19:01:50 EDT 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