Python: Check if string is null or empty
if my_string and my_string.strip():
print("not null and not empty string")
else:
print("null or empty string")
Via StackOverflow.
if my_string and my_string.strip():
print("not null and not empty string")
else:
print("null or empty string")
Via StackOverflow.
Leave a comment