Python - Multiple Inheritance and Method Resolution
What will be the output of the following Python code?
class X:
def speak(self):
print('X speaks')
class Y(X):
def speak(self):
print('Y speaks')
class Z(X):
def speak(self):
print('Z speaks')
class W(Y, Z):
pass
w = W()
w.speak()