Why we use self

why we use self in method ? what is the use of self ?
can you please elaborate ??

The self is used to represent the instance of the class. With this keyword, you can access the attributes and methods of the class in python It binds the attributes with the given arguments.

1 Like