Answers for "check if is empty string pypthon"

18

check if string is empty python

my_str = ""
if not my_str:
  print("empty")
else:
  print("not empty")
#output: empty
Posted by: Guest on May-09-2020
3

check if variable is empty python

if variable:
  # code goes here...
Posted by: Guest on May-14-2020

Code answers related to "check if is empty string pypthon"

Python Answers by Framework

Browse Popular Code Answers by Language