THIS LINK goes into great detail about your question ....
Python class are very strange, as they try to keep some of the C++ syntax
class Teacher():
def __init__(self,name)
self.name = name
"__init__" is executed every time the object is created
"self" is a reference to the class
"self.name = name" creates a class variable "name" for the class "Teacher" (( why the heck does Python do it this way ?! ))
In Java it's a lot easier to work with objects ...
public class Teacher {
String name;
public Teacher (String n) {
name = n;
}
}