easy way to remove nonprintable chars from string
isaac at blueapples.org
Thu Jul 24 22:04:15 CEST 2003
This seems to work. Not sure how fast it'd be, though.
results = ""
for char in str:
results += char
Don Hiatt wrote:
>Is there an easy way to remove multiple non-printable
>(e.g. "not strings.printable") from a string? Perhaps
>something like foo.replace(list_of_nonprintables, '')
>if it only existed? :-)
More information about the Python-list