Articles → Python → del method in python for deleting module from default namespace

del method in python for deleting module

from default namespace






Purpose





Click to Enlarge












Using del for variables




temp = "This is temp variable"

# Print
print(temp)

#Delete
del(temp)

# Print (This method will give error)
print(temp)





Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, April 16, 2019
 
Updated On  -  Wednesday, May 15, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250