Plane has two base classes, Wing and Tail. Both set the class variable mark, and only Tail has the method label.
class Wing:
mark = "w"
class Tail:
mark = "t"
def label(self):
return self.mark
class Plane(Wing, Tail):
pass
print(Plane().label(), Plane.mark)
What does the program print?Log in to join the discussion.
Loading…