LogiQuest
Back to Object Oriented Programming
22

What is the output of the following code?

class A:
    def who(self): return 'A'
class B:
    def who(self): return 'B'
class C(B, A): pass
print(C().who(), [k.__name__ for k in C.__mro__][:3])
Hard

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.