A closure is an inner function that has access to variables in an enclosing outer function even after the outer function is no longer active in memory. Closures are only applicable to nested functions, making them a specialized yet versatile concept in Python.
closure_func retains access to x even though outer() has finished executing.