+ 1
How to use Super in python 3
2 odpowiedzi
+ 10
I don't know much about it.
This link will be helpful 😃
https://www.google.com/url?q=http://www.pythonforbeginners.com/super/working-JUMP_LINK__&&__python__&&__JUMP_LINK-super-function&sa=U&ved=2ahUKEwiuu7SC5KrbAhXJYo8KHfQJDH8QFjAAegQICRAB&usg=AOvVaw0j3GxI1TsV3U_OkFdu2Dfn
+ 1
Super is function.this is used in oop programming.suppose you have a parent class and you want to use in base class by using inheritance.when we use parent class in base class you can tell the python by using super function which attribute you want to override of parent class in base class.e.g=
class Car():
def__init__(self,name,speed,acc)
self.name=name
self.speed=speed
self.acc=acc
class Newcar(Car):
def__init__(self,name,speed,acc,price):
super().__init__(name,speed)->Now super override the attribute of Car class in Newcar class.
self.price=(price)