"""author: @pythonpips"""

foo = "Hello Pythonista"
del foo
print(foo)
"""This will outputs:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'foo' is not defined
"""
How to Delete a Variable in Python

Subscribe to our newsletter