- March 12, 2020
- Posted by: Riddhi Dhandha
- Category: Python Coaching at TCCI
A constructor is a special type of method (function) which is used to initialize the instance members of the class.
2 Types of Constructor
1.parameterized 2. non-parameterized
Constructor definition executes when we create object of the class. Constructors also verify that there are enough resources for the object to perform any start-up task.
Destructors are called when an object gets destroyed. It’s the polar opposite of the constructor, which gets called on creation.
These methods are only called on creation and destruction of the object. They are not called manually but completely automatic.
To know more about python at TCCI.
Call us @ 9825618292
Visit us @ http://tccicomputercoaching.com/