使用全域變數 a = 1 # 建立全域變數a def fun(): a=5 print(a) #5 a = a+10 # 改變全域變數a的值 print(a) #15 fun() # 呼叫函式 print(a) # 顯示 ...
確定! 回上一頁