Answers for "python how to do an empty string"

1

how to check a string is empty in python

my_string = ""

if my_string == "":
  print(True)
else:
  print(False)

# Remember if you have even a white space in the string, the output will be - False.
Posted by: Guest on November-29-2021

Code answers related to "python how to do an empty string"

Python Answers by Framework

Browse Popular Code Answers by Language