+ 1
Can i access a pages outside the class? If it then how can i access?
https://code.sololearn.com/cEwQh1ebhgil/?ref=app HAPPY NEW YEAR TO ALLšššš
1 Answer
+ 2
You have come across a name mangling in python - the way python declares the variable private, though not restricting access to it (it is more like an agreement). So, to access your dundered variable from outside the class, try to use this syntax:
kalam._book__page
Of course I hope you do not use dunders without necessity.