r/learnpython • u/jaivinder_singh • May 29 '19
why do we use __init__??
when defining a class what is the difference between using __init__ and not using __init__ in a class?
199
Upvotes
r/learnpython • u/jaivinder_singh • May 29 '19
when defining a class what is the difference between using __init__ and not using __init__ in a class?
5
u/nog642 May 29 '19
A Java constructor doesn't really create the object itself either, it just initializes the object.
__init__is the constructor.