isspace() - Returns True if all characters in the string are whitespaces

Returns True if all characters in the string are whitespace.  Tabs, carriage returns and line feeds are considered to be whitespace.

Example

Python
print(' '.isspace())
print('\t'.isspace())
print('\r\n'.isspace())
print('ABC DEF'.isspace())

Output

True
True
True
False