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

相关文章:

  • 2021-09-08
  • 2022-12-23
  • 2021-10-10
  • 2022-01-31
  • 2021-10-10
  • 2021-06-29
猜你喜欢
  • 2021-11-11
  • 2021-08-19
  • 2021-10-30
  • 2021-12-16
  • 2021-09-27
  • 2022-12-23
  • 2022-03-03
相关资源
相似解决方案