Skip to content

Instantly share code, notes, and snippets.

@linzino7
Created June 18, 2020 20:30
Show Gist options
  • Save linzino7/3a9b675dbc92d10b92e52f6c6daefb78 to your computer and use it in GitHub Desktop.
Save linzino7/3a9b675dbc92d10b92e52f6c6daefb78 to your computer and use it in GitHub Desktop.
# 全域變數
A = 1
def Sum(X,Y):
global tmp
tmp = X + Y
return tmp
# 呼叫並使用Function
Sum(5,6)
print("tmp值為:",tmp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment