-3
訪問在另一個函數中傳遞的非靜態函數的返回結果作爲參數而不在python中再次調用該函數的語法是什麼?python:用於訪問非靜態函數的返回結果的語法
實施例:
def func(a,b):
return (a+b)
def compute(func)
# what to write here so as to access return value here without calling func
是否有可能?
?做什麼的? –
如果你不叫它,那就沒有返回值。更重要的是,返回值取決於參數(您似乎沒有)。這裏真正的問題是:_你爲什麼要避免調用函數?你試圖解決的實際問題是什麼?_ –