print("calling method on base class"self num_base_calls + class leftsubclass(baseclass)num_left_calls def call_me(self)super(call_me(print("calling method on left subclass"self num_left_calls + class rightsubclass(baseclass)num_right_calls def call_me(self)super(call_me(print("calling method on right subclass"self num_right_calls + class subclass(leftsubclassrightsubclass)num_sub_calls def call_me(self)super(call_me(print("calling method on subclass"self num_sub_calls + the change is pretty minorwe simply replaced the naive direct calls with calls to super()although the bottom subclass only calls super once rather than having to make the calls for both the left and right the change is simple enoughbut look at the difference when we execute its subclass( call_me(calling method on base class calling method on right subclass calling method on left subclass calling method on subclass print( num_sub_callss num_left_callss num_right_callss num_base_calls looks goodour base method is only being called once but what is super(actually doing heresince the print statements are executed after the super callsthe printed output is in the order each method is actually executed let' look at the output from back to front to see who is calling what