Function Details: isspace

Description


Return True if there are only whitespace characters in the string and there is at least one character, False otherwise.


Extended Description


The isspace() method checks if all the characters in the string are whitespace characters. Whitespace characters include space, tab, newline, return, formfeed, and vertical tab. It returns True if all characters in the string are whitespace and there is at least one character, False otherwise.


Read More about isspace from Python Documentation

Function Signature



Module: builtins

Class: str

Parameters



Return


Returns a boolean indicating whether all characters in the string are whitespace characters.


Return Type


bool

Output

Explanation

This example demonstrates the basic usage of isspace(). It returns True because all characters are whitespace (spaces in this case).