Python - Polymorphism and Dynamic Behavior
What will happen when this code runs?
class Cat:
def speak(self):
print('Meow!')
class Robot:
def speak(self):
print('Beep!')
def talk(entity):
entity.speak()
talk(Cat())
talk(Robot())