You probably want to set it to None.
variable = None
Check if variable is “defined”
is_defined = variable is not None
You could delete the variable, but it is not really pythonic.
variable = 1
del variable
try:
print(variable)
except (NameError, AttributeError):
# AttributeError if you are using "del obj.variable" and "print(obj.variable)"
print('variable does not exist')
Having to catch a NameError is not very conventional, so setting the variable to None is typically preferred.