A closure is a event in python. its occur when a nested function doing references a value in its enclosing scope.The whole point here is that it remembers the value.
>>> def A(x): def B():
print(x)
return B
>>> A(7)()
Liked By
Write Answer
What is a closure in Python?
Join MindStick Community
You have need login or register for voting of answers or question.
Prakash nidhi Verma
19-Jul-2018A closure is a event in python. its occur when a nested function doing references a value in its enclosing scope.The whole point here is that it remembers the value.