We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f91d5d commit 4480424Copy full SHA for 4480424
1 file changed
Doc/library/stdtypes.rst
@@ -2123,6 +2123,8 @@ expression support in the :mod:`re` module).
2123
value Numeric_Type=Digit, Numeric_Type=Decimal or Numeric_Type=Numeric.
2124
2125
2126
+.. _meth-str-isprintable:
2127
+
2128
.. method:: str.isprintable()
2129
2130
Return ``True`` if all characters in the string are printable, ``False`` if it
@@ -2139,6 +2141,15 @@ expression support in the :mod:`re` module).
2139
2141
Nonprintable characters are those in group Separator or Other (Z or C),
2140
2142
except the ASCII space.
2143
2144
+ For example:
2145
2146
+ .. doctest::
2147
2148
+ >>> ''.isprintable(), ' '.isprintable()
2149
+ (True, True)
2150
+ >>> '\t'.isprintable(), '\n'.isprintable() # TAB and BREAK LINE
2151
+ (False, False)
2152
2153
2154
.. method:: str.isspace()
2155
0 commit comments