(Datacamp)從零開始學python(6)——Define Functions &Default Arguments &Variable Scope&Nested Function

Define a function def square(value): ...: new_value = value ** 2 ...: return new_value Docstring(描述函數作用) 三個引號 ‘’‘xxxxxxx’’’ (在function header 和function body 之間 ) def square(value): ...: """Return t
相關文章
相關標籤/搜索