less than 1 minute read

Polymorphism - The word means having many forms.

In programming, polymorphism means same function name (but different signatures) being uses for different types.

# len() being used for a string
print(len("Ellie"))
  
# len() being used for a list
print(len([10, 20, 30]))

# Output:
5
3

Reference

Polymorphism definition and examples

The four pillars of object orientation