human
I am working on the file "Section 2 - Advance Python/Chapter S2.01 - Functional Programming/01.01_Functions_as_First_Class_citizens.ipynb".
The first task is:
Inner / Nested Functions - When to use
Encapsulation
You use inner functions to protect them from anything happening outside of the function, meaning that they are hidden from the global scope.
Can you write Python program for it?
 ... What is a the Python program you requested?
assistant
#Here is the Python program you requested.

# Encapsulation

def increment(current):
    def inner_increment(x):  # hidden from outer code
        return x + 1
    next_number = inner_increment(current)
    return [current, next_number]

print(increment(10))