Ok so lets say I have two child classes and a parent class. How would I compare similarities and differences between the two child classes? for example
class vehicles:
def __init__(self, make, model):
self.make = make
self.model = model
class truck(vehicles):
def __init__(self, make, model):
vehicles.__init__(self, make, model)
self.make = "ford"
self.model = "F-150"
class cars(vehicles):
def __init__(self, make, model):
vehicles.__init__(self, make, model)
self.make = "ford"
self.model = "mustang"
how would I get it to print what the two child classes have in common here? I have no idea where to start here. I've looked on other sites and read through my python book but I can't find where it shows me how to do this or I'm just not understanding it. what I'm trying to compare are the objectd of make and model. I didn't know I didn't need the extra self.'s but I'm still not sure what to do here.