InterviewSolution
Saved Bookmarks
| 1. |
What is self variable in Python? |
|
Answer» In Python, a self variable is used for binding the instance WITHIN the class to the instance inside the METHOD. In this, to access the instance variables and METHODS, we have to explicitly DECLARE it as the first method argument. Exampleclass Dog: Output |
|