What is python __ init __ method?

Answer Posted / jithesh sunny

__INIT__ method in the python is a special method used for initializing an class attributes or objects. It can be read as "DUNDER INIT". Usually it will take up an argument called SELF, which is a reference to the object that is created or called.

SELF in python is same as THIS in JAVA. And __INIT__ is also know as constructor in JAVA.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Point out some of the key features of python?

440


What is pop in python?

416


What is difference between raw_input and input in python?

440


How to improve performance of this code?

441


How would you implement inheritance in python?

455






What is python encapsulation?

443


What is syntax in python programming?

468


What is uuid used for?

411


Is there a benefit to using one over the other?

428


What are the two types of functions in python?

451


How is python executed?

443


How is an empty tuple created?

437


What are the different types of reuest in python?

476


Why is python faster than r?

485


How do you represent binary and hexadecimal numbers?

484