class Base1: def amethod(self): print "Base1"class Base2(Base1): passclass Base3: def amethod(self): print "Base3"class Derived(Base2, Base3): passaninstance = Derived()aninstance.amethod()