Computer Science, asked by podapanni2003, 1 month ago

how to define constructor and destructor in python​

Answers

Answered by coolly56
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 vrunda1410
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