CS Electrical And Electronics
@cselectricalandelectronics

Why self is used in Python?

All QuestionsCategory: PythonWhy self is used in Python?
Chetan Shidling asked 4 years ago

Example:
 
def __init__(self):
def update(self):

1 Answers
Chetan Shidling answered 4 years ago

It is like a pointer. If you want to point any particular object then you can use self. Suppose you have 10 objects. If you want to point anyone object then you can use self.
 
Correct me if I am wrong.