The method checks whether the string consists of whitespace or not:
a) istitle()
b) isspace()
c) isdigit()
d) isalpha()
Answers
Answered by
1
Answer:
isspace()
Explanation:
The isspace() methods checks whether the string only contains whitespace or not and if it contains only whitespaces it will return true else false.
Syntax:
string_variable.isspace()
Example:
if username.isspace():
print("Username cannot contain whitespaces!")
Hope this helps you!
Similar questions