__init__() is the function which work as a constructor when we build any class.
Syntax-
def __init__(self,variables):
body
program-
#create class
class Computer():
def __init__(self):
print("Object is created")
#create object
c1=Computer()
c2=Computer()
Object is created
Object is created
#create class
class Computer():
def __init__(self,name,age):
print("Name is ",name)
print("Age is ",age)
#create object
c1=Computer('John wick',89)
c2=Computer('Tony strak',45)
Name is John wick
Age is 89
Name is Tony strak
Age is 45