MemotivaObject-oriented programming

What is polymorphism in Python?

Object-oriented programming

Audio flashcard · 0:16

Nortren·

What is polymorphism in Python?

0:16

Polymorphism means that different types can respond to the same operation. In Python, this is achieved through duck typing: if an object provides the expected methods, it can be used in a given context regardless of its actual class. This is more flexible than the static polymorphism of typed languages.
docs.python.org