美文网首页
Python的UnboundLocalError: local

Python的UnboundLocalError: local

作者: shuff1e | 来源:发表于2018-03-18 09:39 被阅读20次
    n=0  
    def func():  
        global n  
        print n  
        n+=1  
      
    func()  
    print n  
    

    相关文章

      网友评论

          本文标题:Python的UnboundLocalError: local

          本文链接:https://www.haomeiwen.com/subject/qrpsqftx.html