Answers for "python if string not null"

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
0

python if not null

#variable
var = "hello python"

#check is not null
if var is not NaN:
    print('Var is not null')
Posted by: Guest on May-18-2021

Python Answers by Framework

Browse Popular Code Answers by Language