Python - String Method - isprintable() Tutorial
The isprintable() method returns True if all the character in the string is printable or the string is empty. otherwise, it returns False.
Syntax-
String.isprintable()
Example-
str1 = "Hello python 3.2"
print(str1.isprintable())
str2 = "\n New line is not printable"
print(str2.isprintable())
str3 = ""
print(str3.isprintable())
Output-
True
False
True