Program Console Vignaankosh.com
Execution Panel
Console is empty.
Inner Class Accessing Private Outer Data is an interactive PYTHON dry run visualizer from the Nestedclass programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.
This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.
class Outer:
def __init__(self):
self.__age = 19
def __outer_show(self):
print("This is private method of outer class")
class Inner:
def get_age(self):
o2 = Outer()
o2._Outer__outer_show()
return o2._Outer__age
o1 = Outer()
oi1 = Outer.Inner()
x = oi1.get_age()
print(x)