class A: def method(self): print("A's method called") class B(A): def method(self): print("B's method called") super().method() class C(A): def method(self): print("C's method called") super().method() class D(B, C): def method(self): print("D's method called") super().method() d = D() d.method()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter