python一段代码 感受一下

class T():
    def aa(self):
        write = 1
        print '123'
       

        class B():
            def hehe(self):
                print write

        c = B()
        c.hehe()


a = T()
a.aa()

输出:

123

1

原文地址:https://www.cnblogs.com/elliottc/p/5184661.html