Advertisements
Advertisements
Question
What is the purpose of the Destructor?
Short Note
Solution
Destructor is also a special method that gets executed automatically when an object exit from the scope. It is just the opposite of the constructor. In Python, _del_( ) method is used as the destructor.
shaalaa.com
Constructor and Destructor in Python
Is there an error in this question or solution?