isprintable() - Returns True if all characters in the string are printable

Returns True if the all characters in a string are printable.  Examples of non-printable characters are carriage return, line feed, and tab.

Example

Python
print('Abc 123 Def !!!'.isprintable())
print('Abc 123\r\nDef !!!'.isprintable()) # CR LF is not printable
print('Abc 123\tDef !!!'.isprintable())   # Tabs are not considered printable!

Output

True
False
False