how to check a non empty string python code example
Example: check if string is empty python
my_str = ""
if not my_str:
print("empty")
else:
print("not empty")
#output: empty
my_str = ""
if not my_str:
print("empty")
else:
print("not empty")
#output: empty