What is a self keyword in python and what is use of self keyword in function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is a self keyword in python and what is use of self keyword in function

Self keyword in python

23rd Dec 2021, 8:42 PM
Pradeep Pogunulla
Pradeep Pogunulla - avatar
1 Answer
+ 1
Read the lessons on classes and objects. Then, self is a commonly (and recommended) variable name to reference an object within one of its methods.
23rd Dec 2021, 10:16 PM
Emerson Prado
Emerson Prado - avatar