global, nonlocal 等Python 變數範圍運用. ... 如果希望指定值的變數是全域範圍的話,則要使用 global. x = 10 def some(): global x x = 20 print x ...
確定! 回上一頁