I would like to print a message if either a or b is empty.
This was my attempt
a = ""
b = "string"
if (a or b) == "":
print "Either a or b is empty"
But only when both variables contain an empty string does the message print.
How do I execute the print statement only when either a or b is an empty string?
The more explicit solution would be this:
In this case you could also check for containment within a tuple: