human
I am working on the file "Python Quick Reference/Functions.ipynb".
The first task is:
9. Closures Nested Functions
Can you write Python code for it?
 ... Write me a the Python code you requested?
assistant
#Here is the Python code you requested.

# this inner closure is used to carry state around
def name_func_from_family(last_name):
    def print_name(first_name):
        print('{} {}'.format(first_name, last_name))
    return print_name #the key here is that the outer function RETURNS the inner function / closure

print_saltwell = name_func_from_family('saltwell')
print_saltwell('erik')
print_saltwell('kasia')
print_saltwell('jacob')