You are here : python_2stringstringisspace

string.isspace() - string

             

The method isspace() checks whether the string consists of whitespace..


  • NA


Syntax

str.isspace()


Example

#!/usr/bin/python

str = "       "; 
print str.isspace()

str = "This is string example....wow!!!";
print str.isspace()


Output / Return Value

When we run above program, it produces following result −


True False


Limitations


Alternatives / See Also


Reference