I want to check if a variable exists. Now I\'m doing something like this:
try: myVar except NameError: # Do something.
Are there othe
A simple way is to initialize it at first saying myVar = None
myVar = None
Then later on:
if myVar is not None: # Do something