aseem traceback (most recent call last)nameerrorname 'numberis not defined explanationthe above example shows that number = while executingit is giving an errorthe number is class variable whose value would be shared among all instances of this class this can be accessed as student number from inside the class or outside the class the method inside the class can access the class variables by using self let' rewrite the program again class studentnumber def dis(self,name,number)print(nameprint(numberprint (self numberst student student(st dis("aseem", outputaseem now you can understand the meaning of self to access the class variable from method dis(we used self because the interpreter binds the parameter self to that object (means classobject is the instance of classthe code binds the parameter self in the method dis(to the student class object referenced by the variable st the code for dis(can then use self to access that particular object' number another exampleclass studentnumber def dis(self,name,number)print(nameprint(numberprint(self numberself number self number print(self numberst student(page