Interviews4 answers
What is self in Python?
4 Answers
Self is like this keyword in php
Md SarfarajPosted Jul 23, 2019, 10:23 PM EDT
self is used to pass the reference to the current class. self solves the same purpose that is achieved by "this" in java
unlike "this", it is a compulsion to pass self in python
Rohit GuptaPosted Jul 9, 2019, 8:15 PM EDT
test
Agyekum EssienPosted Jul 6, 2019, 11:40 PM EDT
Self represents an instance of the class, By using "Self" we can access the attributes and method of the class in a python.
Pravesh DubeyPosted Jun 21, 2019, 3:02 AM EDT


