QUESTION 5 OF 10

How does Python support polymorphism?

Reveal the answer and explore the explanation.

05
MediumHigh priority

How does Python support polymorphism?

Answer
Answer

Different objects can expose a compatible interface, often through duck typing, and be used interchangeably.

Practical example

Call predict on compatible sklearn estimators.

Reference: Further reading ↗

Last 30 min revisionHigh-yield interview Q&As