0 votes
in Python by
What is the use of self in Python?

1 Answer

0 votes
by
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. self is used in different places and often thought to be a keyword. But unlike in C++, self is not a keyword in Python.

Related questions

+1 vote
asked Feb 13, 2023 in Python by rajeshsharma
0 votes
asked Oct 27, 2022 in Python by SakshiSharma
...