[Solved] Python Creating Classes Code
= is an assignment statement, you appear to be confusing this with a ==, the equality comparison operator. The statements are entirely different: self.name = name assigns the value referenced by the local variable name to the attribute name on the object referenced by self. It sets an attribute on the newly created instance, from … Read more