1.

How will you create constructor in Python?

Answer»

In Python, there is a special function called “init” which act as a Constructor. It must begin and end with double underscore. This function will act as an ordinary function;

General format of init method (Constructor function) def_init_(self.[args …………….]):

<statements>



Discussion

No Comment Found