/  Isspace() method in Python String Module

Isspace() method in Python String Module


Isspace method in string module returns the output as TRUE if the string has only spaces/white spaces or else it return the output as FALSE.


Syntax:

str.isspace()


Example-1:

text = "  "
x = text.isspace()
print(x)


Output:


Example-2:

text = " Geneva "
x = text.isspace()
print(x)


Output: