Characters that are used for spacing are called whitespace characters. For example: tabs, spaces, newline, etc.
The syntax of isspace() is:
string.isspace()
isspace() Parameters
isspace() method doesn't take any parameters.
Return Value from isspace()
isspace() method returns:
Trueif all characters in the string are whitespace charactersFalseif the string is empty or contains at least one non-printable character
Example 1: Working of isspace()
Output
True False False
Example 2: How to use isspace()?
Output
All whitespace characters Contains non-whitespace characters