Filtering out non-readable characters

Jp Calderone exarkun at divmod.com
Sat Jul 16 19:07:26 EDT 2005


On Sat, 16 Jul 2005 19:01:50 -0400, Peter Hansen <peter at engcorp.com> wrote:
>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?
>

http://python.org/doc/lib/node109.html

>-Peter
>--
>http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list