belongs to collection: Function programs in python with examples
Write a Python program to access a function inside a function
I have used python 3.7 compiler for debugging purpose.
def test(a): def add(b): nonlocal a a += 1 return a+b return add func= test(10) print(func(10))
Result:21
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
I have used python 3.7 compiler for debugging purpose.
Result:
need an explanation for this answer? contact us directly to get an explanation for this answer21