Python String isprintable() Method

Last Updated : 30 Dec 2025

Python isprintable() method returns True if all characters in the string are printable or the string is empty. It returns False if any character in the string is Nonprintable.

Syntax of Python String isprintable() Method

It has the following syntax:

Parameters

No parameter is required.

Return

It returns either True or False.

Different Examples of Python String isprintable() Method

Let's see some examples of isprintable() method to understand it's functionalities.

Example 1

It is a simple example that prints True, if the string is printable. See the example below.

Output:

True

Example 2

Here, we are using some other characters like newline and tabs in the string. See the results of the example.

Output:

True
False
False

Example 3

Testing different-different string values which contains special chars too. In case of special chars, method returns False.

Output:

It is printable
It is printable
Not printable
 
Next TopicPython Strings