how to delete objects python code example
Example 1: deleting an object in python
>>> class Test:
... def __del__(self):
... print "deleted"
...
>>> test = Test()
>>> del test
deleted
Example 2: python delete class object
del <whatever object name you want to delete>