What is use of __ init __ in Python?

The __init__ method is similar to constructors in C++ and Java . Constructors are used to initialize the object’s state. The task of constructors is to initialize(assign values) to the data members of the class when an object of class is created .

Sizin İçin Seçtik  What is constructor in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

What is use of __ init __ in Python?

The __init__ method is similar to constructors in C++ and Java . Constructors are used to initialize the object’s state. The task of constructors is to initialize(assign values) to the data members of the class when an object of class is created .

Sizin İçin Seçtik  What is object oriented examples?

Leave a Reply

Your email address will not be published. Required fields are marked *