Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

polymorphism in python

# Python program to demonstrate in-built poly-
# morphic functions

# len() being used for a string
print(len("geeks"))

# len() being used for a list
print(len([10, 20, 30]))
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #polymorphism #python
ADD COMMENT
Topic
Name
2+5 =