What is a closure in Python? Prakash nidhi Verma 19-Jul-2018 1049 1 Answers Last updated:9/19/2020 6:27:07 AM
Prakash nidhi Verma 19-Jul-2018 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)()
Prakash nidhi Verma
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.