PyDocs

Nav

Python Runtime Services

str.isspace

builtins

method of str
  • str.isspace()
Return True if the string is a whitespace string, False otherwise.

A string is whitespace if all characters in the string are
whitespace and there is at least one character in the string.
1 Example
>>> ''.isspace()
False
>>> ' '.isspace()
True
>>> '\t\n'.isspace() # TAB and BREAK LINE
True
>>> '\u3000'.isspace() # IDEOGRAPHIC SPACE
True
from the Python docs
See Also
No see-alsos for builtins/str.isspace
0 Notes
No notes for str.isspace