Last answered:

15 Nov 2021

Posted on:

13 Nov 2021

0

__init__ python confusion

what if we do not use __init__ (self) in a class?

1 answers ( 0 marked as helpful)
Instructor
Posted on:

15 Nov 2021

0

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

Submit an answer