# -*- coding: utf-8-*-
__author__ = 'manman'


def func_outer():
    x = 2
    print('x is', x)

    def func_inner():
        nonlocal x  # zhe li bu dui ya. bu dong.

        x = 5

        func_inner()
        print('Changed local x to', x)


func_outer()
