cls refers to the class, whereas self refers to the instance . Using the cls keyword, we can only access the members of the class, whereas using the self keyword, we can access both the instance variables and the class attributes.
cls refers to the class, whereas self refers to the instance . Using the cls keyword, we can only access the members of the class, whereas using the self keyword, we can access both the instance variables and the class attributes.