What is self in Python?

Question

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.

0
m_prth 3 years 0 Answers 612 views Member 0

Leave an answer

Browse
Browse