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
In questa pagina del sito puoi guardare il video online super function in python|| explain in hindi della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Coding With Sarika 23 novembre 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 70 volte e gli è piaciuto 3 spettatori. Buona visione!