Python supports Multiple Inheritance. We can place multiple Parent class in Child class. Following example shows how it works:
class Sports: def Play(self): print("Play Games") def showResult(self): print("Result of Sports") class Study: def Exam(self): print("Appear to Exam") def showResult(self): print("Result of Exam") class Student(Sports,Study): def show(self): super().Play() super().Exam() super().showResult() #Left to Right Search in Parent Classes Study().showResult() #can call like this S=Student() S.show()
Here super().showresult() will called for Sports as Sports is Left in Inheritance.