Python Polymorphism

Python Polymorphism In Hindi

Python

Python Polymorphism In Hindi – Polymorphism Ye Object-Oriented Programming Ka Bahut Hi Accha Feature Hai And Polymorphish Ek Hi Rup Mai Ek Jyada Rup Hona Polymorphish Hota Hain |

Polymorphism Ye Word ‘poly’ or ‘morph’ In Word Se Milkar Bana Hai|

Python Polymorphism In Hindi

What is Polymorphism in Hindi:  Polymorphism Means Hota Hai Many Forms In Programming Mai And Polymorphism Mai Kuch Function Hote Hai Jinhe Ham Different Types Mai Istemal kar Sakte Hain |

Example of inbuilt polymorphic functions :

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

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

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

Output:

6
3

Examples of used defined polymorphic functions :

# A simple Python function to demonstrate 
# Polymorphism 

def add(x, y, z = 0): 
	return x + y+z 

# Driver code 
print(add(2, 3)) 
print(add(2, 3, 4)) 

Output:

5
9

Yadi Aapne  HTML Full Course  And CSS Full Course And Python Full Course And PHP Full Course Nhi Read Kiya Hai To Aap Vah Bhi Read Kar Sakte Hai |

Leave a Reply

Your email address will not be published. Required fields are marked *