Python Programming - Inheritance - Discussion

Discussion Forum : Inheritance - General Questions (Q.No. 25)
25.
What is the purpose of the __del__() method in Python classes?
To delete a class instance
To define class attributes
To create a new instance of the class
To access superclass attributes directly
Answer: Option
Explanation:
The __del__() method is called when an instance of a class is about to be destroyed, providing an opportunity for cleanup operations.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.