super function in python|| explain in hindi

Опубликовано: 23 Ноябрь 2023
на канале: 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


На этой странице сайта вы можете посмотреть видео онлайн super function in python|| explain in hindi длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Coding With Sarika 23 Ноябрь 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 70 раз и оно понравилось 3 зрителям. Приятного просмотра!