Answers for "how to check if var is set python"

0

how to check if var is set python

try:
    thevariable
except NameError:
    print("well, it WASN'T defined after all!")
else:
    print("sure, it was defined.")
Posted by: Guest on May-29-2021

Code answers related to "how to check if var is set python"

Python Answers by Framework

Browse Popular Code Answers by Language