码迷,mamicode.com
首页 > 编程语言 > 详细

python一段代码 感受一下

时间:2016-02-07 13:37:46      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:

 

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

python一段代码 感受一下

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!