Remove no-printable characters in string

Paul Rubin http
Wed Dec 3 05:53:35 EST 2003


pascal.parent at free.fr (Pascal) writes:
> What's the best way to delete or replace no-printable characters in a string.
> i.e.: "\x08toto\x00titi" -> "tototiti" or " toto titi"

Fastest way is probably with the built-in string.translate operation.




More information about the Python-list mailing list