PyDocs

Nav

Python Runtime Services

str.isprintable

builtins

method of str
  • str.isprintable()
Return True if all characters in the string are printable, False otherwise.

A character is printable if repr() may use it in its output.
1 Example
>>> ''.isprintable(), ' '.isprintable()
(True, True)
>>> '\t'.isprintable(), '\n'.isprintable()
(False, False)
from the Python docs
See Also
No see-alsos for builtins/str.isprintable
0 Notes
No notes for str.isprintable