Answer the question
In order to leave comments, you need to log in
How to call a function within a function?
The code:
>>> def a():
a = 5
def b():
nonlocal a
print(a)
def a():
a = 5
def b():
nonlocal a
print(a)
b()
Answer the question
In order to leave comments, you need to log in
def a():
a = 5
def b():
nonlocal a
print(a)
return b
fb = a()
fb()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question