python not null
test = "hello world"
if test is not None:
print("test is not None")
test2 = None
if test2 is None:
print("test2 is None")
python not null
test = "hello world"
if test is not None:
print("test is not None")
test2 = None
if test2 is None:
print("test2 is None")
check if string is empty python
my_str = ""
if not my_str:
print("empty")
else:
print("not empty")
#output: empty
python if not null
#variable
var = "hello python"
#check is not null
if var is not NaN:
print('Var is not null')
how to check empty string in python
my_empty_string = '' # given the empty string a variable
def check_empty():
if not my_empty_string:
print("Empty")
else:
print("Not Empty")
check_empty()
# by George Kwabena
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us