human
check if a variable exists
assistant
Here is some code to check if a local variable `myVar` exists

('myVar' in locals())

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.