Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Python
  3. Question
Python

What does Python _init_ and self do?

Asked by Ankit Chauhan Apr 14, 2021 844 views 1 answer
Share

About this question

 In a method like:

def method(self, something):

    def __init__(?):

        ....

    ....

What does self do? What is it meant to be?

What does the __init__ method do and why is it necessary?

Your answer

1 Answer

More Python discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Python Blogs

Guides, tips and career advice on Python from JanBask experts.