我的問題是相當容易,我認爲...爲什麼返回不能返回我的變量?
我需要通過一個excel列表,只是想打印出某些領域(開始只有前10行(所以low_run = 0,high_run = 10 ,並運行= 10太)
現在我想獲得未來10所以我需要:
def get_input(high_run, low_run, run):
pressed_key = input('')
if pressed_key == "n": # Next Page
set_high_run_np(high_run, run)
set_low_run_np(low_run, run)
def set_high_run_np(high_run, run):
if high_run != len(ldata):
high_run = high_run + run
return high_run
def set_low_run_np(low_run, run):
if low_run != len(ldata) - run:
low_run = low_run + run
return low_run
的功能做的工作,並會推出low_run = 10和high_run = 20。它剛剛獲得」 t返回這些數字,以便他們可以使用...任何想法爲什麼?
提前致謝,對於任何語法錯誤感到抱歉。沒有母語的人
Cya!
那麼他們顯然*做*返回值,所以別的事情正在發生。請說明你如何使用這些函數以及你在使用返回值時遇到什麼問題。 –
向我們展示您撥打 – stybl
功能的部分代碼。編輯它的問題 – MisterMojo