super function in python|| explain in hindi

Published: 23 November 2023
on channel: Coding With Sarika
70
3

super function in python|| explain in hindi||‪@codingwithsarika‬


Super():- The super function is used to give access to method and properties of a parent class. The super function returns an object the represents the parent class.


code:-

#Super() Function
class Emp():
def empdetail(self,id,name,Add):
self.id = id
self.name = name
self.Add = Add

Class Detail inherits Emp
class Detail(Emp):
def __init__(self, id, name, Add, Emails):
super().empdetail(id, name, Add)
self.Emails = Emails

Emp_1 = Detail(103, "Rahul", "Pune" , "RR@gmails")
print('The ID is:', Emp_1.id)
print('The Name is:', Emp_1.name)
print('The Address is:', Emp_1.Add)
print('The Emails is:', Emp_1.Emails)


Tags:-
#superfunction
#superfunctioninpython
#pythonbasicconcept
#pythontutorial
#pythoncode
#pythonprogram
#pythoncourse
#superfunctionexplaininhindi


On this page of the site you can watch the video online super function in python|| explain in hindi with a duration of hours minute second in good quality, which was uploaded by the user Coding With Sarika 23 November 2023, share the link with friends and acquaintances, this video has already been watched 70 times on youtube and it was liked by 3 viewers. Enjoy your viewing!