Answers for "check for blank space in python"

0

python is space

# isspace() is method of the <str> returns True if the string has only empty spaces
print(" ".isspace())  # True
print("     ".isspace()) # True
print(" test".isspace())  # False
print("".isspace()) # False
Posted by: Guest on March-18-2021
0

check space in string python

if ' ' in string_to_check:
   print ("There is space in the string")
else:
   print ("No space in the string")
Posted by: Guest on January-24-2022

Python Answers by Framework

Browse Popular Code Answers by Language