認識python(四)

1.函數 def 函數名(): 執行的命令 函數名() return 返回一值(可以爲列表元組), 只會運行一個return 2.函數的4 種類型 def 函數名(): pass def 函數名(): return xxx def 函數名(參數): pass def 函數名(參數): return xxx 3.函數的嵌套 在一個函數中執行另外一個函數 但是要清楚形參和實參 107 a(b)b就是形
相關文章
相關標籤/搜索