I want to display the value of a variable in world function.
def base():
print("Hello World")
def child():
a = 10
return a
def world():
num = base.child() # error -------
print(num)
world()```
I suggest calling child in base.
def base():
print("Hello World")
def child():
a = 10
return a
return child()
def world():
num = base()
print(num)
world()
baserepresent in the expressionsbase.child()? A scalar value, an object, a class, a method, or what?