class Person(object): name="Person" def __init__(self): self.live=20 self.name="" def age(self): return self.live-10 class Man(object): def __init__(self): self.live=100 def age(self): return self.live class Students(Man,Person): pass ming=Students() print(ming.age())
class Person(object): name="Person" def __init__(self): self.live=20 self.name="" def age(self): return self.live-10 class Man(object): live=100 def age(self): return self.live class Students(Man,Person): pass ming=Students() print(ming.age())
class Person(object): name="Person" def __init__(self): self.live=20 self.name="xixi" def age(self): return self.live-10 class Man(object): live=100 def age(self): return self.live class Students(Man,Person): pass ming=Students() print(ming.name)
class Person(object): name="Person" def __init__(self): self.live=20 self.name="" def age(self): return self.live-10 class Man(object): live=100 def age(self): return self.live class Students(Man,Person): pass ming=Students() ming.name="dada" print(ming.name)