Python super() and the MRO: How method lookup climbs the hierarchy

Python super() and the MRO: How method lookup climbs the hierarchy

In Python, super() searches the MRO until it finds a match:

class GP:
    def x(self):
        return f'In GP'
class P(GP):
    pass
class C(P):
    def x(self):
        r = super().x()
        return f'Child got "{r}" from super'
c = C()
c.x()  # shows Child + Grandparent