What is Polymorphism in Python?
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