In Boolean context, sequences are evaluated either as FALSE or TRUE and empty strings are considered as false.
So you can simply check if the string is false using:
if not mystring:
You can also use the strip() method:
print("not an empty string")
In case, the variable is something other than a string, use this:
myString== “ “
If you wish to know what is python visit this python tutorial and python interview questions.