Difference between constructor and method

0 votes
Can you please tell what is the difference between a constructor and a method?
Aug 14, 2019 in Python by Fata
• 1,050 points
4,953 views

1 answer to this question.

0 votes

Method: It a function which is the member of a class. Methods consists of statements that may or may not return an output. 

Constructor:  It is a special type of method that has the same name the class name. These methods are used to initialize an object's state.

answered Aug 14, 2019 by Wajiha
• 1,960 points

Related Questions In Python

0 votes
1 answer

In python whats difference between default constructor and no parameter constructor?

The default constructor is called when there ...READ MORE

answered Oct 6, 2020 in Python by Gitika
• 65,730 points
2,220 views
0 votes
1 answer

What's the difference in Qt between setVisible, setShown and show/hide

show() is just a convenience function for ...READ MORE

answered Apr 17, 2018 in Python by anonymous
9,405 views
0 votes
1 answer

What is the difference between list and tuple?

List has [ ] brackets while tuple ...READ MORE

answered May 11, 2021 in Python by Mohit Khurana

edited Mar 5, 2025 8,232 views
0 votes
1 answer

Difference between '==' and 'is'

'==' checks for the equality of the ...READ MORE

answered May 14, 2018 in Python by Nietzsche's daemon
• 4,260 points
1,428 views
0 votes
1 answer

Difference between pop and delete methods

Using delete leaves undefined holes in the ...READ MORE

answered Jan 18, 2022 in Python by saurabh thapa

edited Mar 5, 2025 2,938 views
+1 vote
2 answers

What is the difference between classes and labels in machine learning?

Classes and Labels both are almost same things ...READ MORE

answered Apr 3, 2019 in Python by SA
• 1,090 points
9,210 views
0 votes
1 answer

What is the difference between Python and IPython?

There are few differences between Python and ...READ MORE

answered Jul 26, 2018 in Python by Priyaj
• 58,020 points
5,060 views
0 votes
1 answer

Difference between del, remove and pop on lists

es, remove removes the first matching value, ...READ MORE

answered Aug 1, 2018 in Python by Priyaj
• 58,020 points
1,870 views
0 votes
1 answer

Difference between function and generator?

Normal Functions vs Generator Functions: Generators in Python ...READ MORE

answered Jul 15, 2019 in Python by Wajiha
• 1,960 points
5,569 views
0 votes
1 answer

Difference between ElementTree and Minidom

Python allows parsing these XML documents using ...READ MORE

answered Jul 22, 2019 in Python by Wajiha
• 1,960 points
6,741 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