What does super function do in python

0 votes
How do we use it in single inheritance in python?
Jul 16, 2019 in Python by Waseem
• 4,540 points
809 views

1 answer to this question.

0 votes

Super function calls the parent class method directly from the child class in python.

class Parent():
def func():
print("this is function 1")
class Child(Parent): 
def func1():
print("this is function 2")
super.func()


ob = Child()
ob.func1()
answered Aug 2, 2019 by Mohammad
• 3,230 points

Related Questions In Python

0 votes
1 answer

What does the random.triangular(low, high, mode) function do in python?

It returns a random floating point number ...READ MORE

answered May 27, 2019 in Python by Vinod
1,088 views
0 votes
1 answer

What does numpy.reshape() function do in python?

numpy.reshape() gives a new shape to an ...READ MORE

answered May 29, 2019 in Python by Kyraa
1,107 views
0 votes
0 answers

What does super() do in python?

How does it help in multiple inheritance? READ MORE

Sep 6, 2019 in Python by Waseem
• 4,540 points
533 views
0 votes
1 answer

What does ' -> ' mean in Python function definitions?

It's a function annotation. In more detail, Python 2.x ...READ MORE

answered May 23, 2018 in Python by charlie_brown
• 7,720 points
913 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,441 views
0 votes
1 answer
0 votes
1 answer

How to perform inheritance on private and protected members in python?

Python does not really have private or ...READ MORE

answered Aug 19, 2019 in Python by Mohammad
• 3,230 points
762 views
0 votes
1 answer

What does the dir() function do in python?

The dir() function returns all properties and methods of ...READ MORE

answered Aug 6, 2019 in Python by Mohammad
• 3,230 points
931 views
0 votes
1 answer

what does a conditional operator in python do?

Conditional operators in python is same as ...READ MORE

answered May 2, 2019 in Python by Mohammad
• 3,230 points
1,392 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP