I want to check is name "my_name" (which is my class object) defined already. How can I do it w/out using try-except:
try:
if c:
print("ok")
except NameError:
print("no")
I want to check is name "my_name" (which is my class object) defined already. How can I do it w/out using try-except:
try:
if c:
print("ok")
except NameError:
print("no")