__init__ python confusion
what if we do not use __init__ (self) in a class?
1 answers ( 0 marked as helpful)
Hey Wahab,
Thank you for your question!
As Giles says, the __init__
method gives you control over the variables that go into an object. Moreover, this method allows you to create instances of the same class where each instance carries different values for the variables.
You can find out more in the Python documentation. As you advance in the course, you will appreciate the __init__
method more and more :)
Kind regards,
365 Hristina