when operating on instance objectsyou should always use the first waybecause it leaves the job to look up the class to python and your code will be more flexible this will become clear later when we talk about inheritance constructors are useful for initialization the code for the class as written above is not very robust it does not ensure that the account object actually has balance attribute before trying to print it out if we just add the following two lines of code to the main programpython gives us an errorcomplaining about the fact that we try to print out balance attribute of the stefansacc objectalthough we never created balance attribute for this object stefansacc account(stefansacc print_info(remember to always make sure that any attribute that your methods try to access actually exists in this caseusing constructor method is helpful in pythona constructor method is in fact an initialization method class account(object)'' class representing an account ''constructor def __init__(selfnumperson)self balance self number num self holder person methods main part of the program execution starts hereif __name__ ="__main__"annesacc account( "anne"annesacc deposit( annesacc print_info(stefansacc account( "stefan"stefansacc deposit( stefansacc print_info(in pythonconstructor methods must have the name init (note the two underscores at either side)and it must have self parameter when creating an objectsuch as in line the following happenspython creates new objectannesacc and then calls the constructor method init (selfnumpersonthe values of the parameters num and person are given when creating the object by calling the classaccount( "anne"againthe new annesacc annemarie friedrichcis lmu munchenws /