when an instance of class is createdthe class constructor function is automatically called when an instance of class is createdthe class constructor constructor is always named __init__(the funcdon is automadcally called it contains code for initializing new instance of the class to the cinitial onstructor always setting named _instance _init__(attribute valuesspecific stateis ( contains code isfor inidalizing new instance of is the class to presentana empty object created if *noit constructor specific inidal state ( setng instance akribute valuesclass persondef __init__selfs )self name def helloself )print "hello"self name person("john" hello(hello john constructor function taking initial value for instance attribute name calls __init__(on person