1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-11 01:04:10 +02:00
This commit is contained in:
rainjay
2015-11-03 11:09:19 +08:00
parent 2ecf370ce4
commit a25d4db0bc

View File

@@ -450,7 +450,7 @@ def add(x, y):
print "x is {0} and y is {1}".format(x, y)
return x + y # 用 "return" 來回傳值
# 用參數來呼叫
# 用參數來呼叫
add(5, 6) # => 輸出 "x is 5 and y is 6" 並回傳 11
# 你也可以寫上參數名稱來呼叫函式