Python self Parameter
Multiple Choice Medium
Question
What does the `self` parameter in a Python method refer to?
Hint
self is the conventional name for the first parameter of instance methods.
Explanation
self refers to the current instance of the class. When you call obj.method(), Python passes obj as the first argument to method. It allows the method to access instance attributes and other methods on the same object.
Related Resources
Related Lessons
- Classes and Objects
The self parameter.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.