How would the attribute __a of the class b be accessed from outside the class?
Its called pseudo private class variable, with the two underscores prefix. They are not truly private, just a bit obfuscated. This is how you can access them: https://code.sololearn.com/caqn8lQkDFKt/?ref=app
With instantiating the class: t = b() print(t._b__a) Without instantiating: print(b.__dict__['_b__a'])
Free month of PRO subscription
Please help me with HTML
Hash in python
Unable to overload +
Package of the Java
What is the mistake here?