Implementing Polymorphism Using Duck Typing

Implement polymorphism using duck typing.

Duck typing is one of the most useful concepts in object-oriented programming in Python. Using duck typing, we can implement polymorphism without using inheritance.

What is duck typing?

We say that if an object quacks like a duck, swims like a duck, eats like a duck or in short, acts like a duck, that object is a duck.

Get hands-on with 1400+ tech skills courses.