python中若是函數後面有多於一個括號是怎麼回事?

通常而言,調用一個函數是加一個括號。若是看見括號後還有一個括號,說明第一個函數返回了一個函數,若是後面還有括號,說明前面那個也返回了一個函數。以此類推。html 好比fun()()python def fun(): print("this is fun"); def _fun(): print("this is _fun"); return _fun; Yo
相關文章
相關標籤/搜索