+ 1

Classes in python

Guys can you help me, i have a problem with word self, I don't how and when i can use it

23rd Sep 2022, 9:20 AM
Oussama Harmouche
Oussama Harmouche - avatar
2 Respostas
+ 5
Oussama Harmouche , here is link to a short tutorial from the community section about classes: https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2467/?ref=app
23rd Sep 2022, 9:54 AM
Lothar
Lothar - avatar
+ 3
Python "self" is similar to "this" in other programming language. You need it to refer to class properties and methods when you define the class.
23rd Sep 2022, 9:49 AM
Lisa
Lisa - avatar