0
why we use __init__ in class?
7 odpowiedzi
+ 6
It is the synthax to declare a constructor in python.
+ 6
constructor gets called internally when instance is created...it is used to allocate all attributes of a class for each instance
+ 3
A constructor is a method that is called when creating an object of your class. Typically, it will initialize the attributes of your object.
+ 2
constructor is a method ,Python calls while creating object. It uses to initialize (assigning values) to instance variables or attributes.
+ 2
Init is to initialize a constructor, variable, etc.
+ 1
what is constructor?? thnx for result
+ 1
it's for initialization of class and called constructor method