python之lambda等小筆記

''' 全局變量 ''' >>> count = 5 >>> def fun(): ...    count = 10 ...    print(count) ... >>> fun () 10 >>> print(count) 5閉包 ''' 函數修改全局變量 '''函數 def fun():       global count       count = 10       print(cou
相關文章
相關標籤/搜索