What is self in Python?
Self is an object of a class. In Python, this is explicitly included as the main parameter. Nonetheless, this isn’t the situation in Java where it’s discretionary. It assists with separating between the methods and data members of a class with local members.
The self variable in the init technique alludes to the recently made object while in different functions, it alludes to the item whose method was called.
Leave an answer