Q:

Write a Python program to access a function inside a function

0

Write a Python program to access a function inside a function

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def test(a):
        def add(b):
                nonlocal a
                a += 1
                return a+b
        return add
func= test(4)
print(func(4))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now