output we first created class called date and pass the object as an argumenthere-object is built-in class provided by python later we created another class called time and called the date class as an argument through this call we get access to all the data and attributes of date class into the time class because of that when we try to get the get_date method from the time class object tm we created earlier possible object attribute lookup hierarchy the instance the class any class from which this class inherits inheritance examples let' take closure look into the inheritance exampleobject animal cat dog let' create couple of classes to participate in examplesanimalclass simulate an animal catsubclass of animal dogsubclass of animal in pythonconstructor of class used to create an object (instance)and assign the value for the attributes constructor of subclasses always called to constructor of parent class to initialize value for the attributes in the parent classthen it start assign value for its attributes