warningherewe kept the class and main function in separate files it is not good idea keep these small related-codes separate like this we will learn to manage the code as we will write some big codes in the tutorial listing save classes in separate file #junglebook py #class declaration class jungle#constructor with default values def __init__(selfname="unknown")self visitorname name def welcomemessage(self)print("hello % welcome to the jungleself visitornamelisting import class to main py #main py #import class 'junglefrom junglebook py from junglebook import jungle def main()create object of class jungle jungle("meher" welcomemessage(hello meherwelcome to the jungle if no name is passedthe default value unknown will be used jungle( welcomemessage(hello unknownwelcome to the jungle standard boilerplate to set 'mainas starting function if __name__=='__main__'main(inheritance supposewe want to write class 'ratejunglein which visitor can provide 'ratingbased on their visitingexperience if we write the class from the startingthen we need define attribute 'visitornameagainwhich will make the code repetitive and unorganizableas the visitor entry will be at multiple places and such code is more prone to error with the help of inheritancewe can avoid such duplication as shown in listing where class jungle is inherited at line by the class 'ratejunglenowwhen the object 'rof class 'ratejungleis created at line of listing then this object 'rwill have the access to 'visitornameas well (which is in the parent classlisting inheritance #junglebook py #class declaration class jungle#constructor with default values def __init__(selfname="unknown")self visitorname name def welcomemessage(self)(continues on next page object oriented programming