1self represents the instance of the class. By using the “self” keyword we can access the attributes and methods of the class in python. It binds the attributes with the given arguments.
1class Class(parentClass):
2 def __init__(self,arg):
3 self.arg = arg
4
5 def function(self):
6 print(arg)