Delete Variable

#Delete Variable

# Assigning a value to x  
x = 6  
print(x)
print("=========================")

# deleting a variable.   
del x  
print(x)
print("=========================")



Output:

6
=========================
Traceback (most recent call last):
  File "C:/Users/mhtpr/Documents/FormatFactory/variable.py", line 112, in <module>
    print(x)
NameError: name 'x' is not defined