how to define constructor and destructor in python
Answers
Answered by
0
Answer:
In python, you can define classes using keyword class. The basic class skeleton that has a constructor and a destructor is given below. The constructor is implemented using __init__(self) which you can define parameters that follows the self. The destructor is defined using __del__(self).
Answered by
0
Answer:
In python, you can define classes using keyword class. The basic class skeleton that has a constructor and a destructor is given below. The constructor is implemented using __init__(self) which you can define parameters that follows the self. The destructor is defined using __del__(self)
Similar questions