The concept where the inner function captures and remembers the enclosing function's local state is called _______.
- Abstraction
- Closure
- Encapsulation
- Inheritance
The concept where the inner function captures and remembers the enclosing function's local state is called a Closure. Closures are used in Python to create functions with behavior that depends on the variables in the enclosing function.
Loading...
Related Quiz
- Which of the following tuple methods returns the number of times a specified value appears in the tuple?
- To convert a list into a set in Python, you can pass the list to the ____ constructor.
- Which algorithmic paradigm divides the problem into subproblems and solves each one independently?
- Which built-in function can be used to create a set in Python?
- Which library would you primarily use for implementing linear regression in Python?