Variable set outside __init__
belong to the class. They’re shared by all instances.
Variables created inside __init__
(and all other method functions) and prefaced with self.
belong to the object instance.
Variable set outside __init__
belong to the class. They’re shared by all instances.
Variables created inside __init__
(and all other method functions) and prefaced with self.
belong to the object instance.