πŸ“Š Python
Q. What is the purpose of `__del__()` method in Python?
  • (A) To construct an object
  • (B) To define a class method
  • (C) To represent string output
  • (D) To perform clean-up before object is deleted
πŸ’¬ Discuss
βœ… Correct Answer: (D) To perform clean-up before object is deleted

Explanation: `__del__()` is the destructor in Python, called when the object is about to be destroyed.

Explanation by: Mr. Dubey
`__del__()` is the destructor in Python, called when the object is about to be destroyed.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
42
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate