filmov
tv
Python Interview Questions #20

Показать описание
Question: What is a Python closure?
Answer: A closure is a function object that retains bindings to its free variables that exist when the function is defined. This allows the function to access those variables even when called outside their original scope.
Answer: A closure is a function object that retains bindings to its free variables that exist when the function is defined. This allows the function to access those variables even when called outside their original scope.