Copyright © tutorialspoint.com
This method checks whether the string consists of whitespace.
str.isspace() |
Here is the detail of parameters:
NA
It return true if there are only whitespace characters in the string and there is at least one character, false otherwise.
#!/usr/bin/python str = " "; print str.isspace(); str = "This is string example....wow!!!"; print str.isspace(); |
This will produce following result:
True False |
Copyright © tutorialspoint.com