Tag: Destructors in Python
Destructors in Python Explain clearly
- Naveen
- 0
A destructor is called when an object is deleted or destroyed. The destructor is the reverse of the constructor. Destructor is used to perform the clean-up activity before destroying the object, such as closing database connections or file handle. The special method __del__() is used to define a destructor. We can define a destructor with…
Read More