描述:python + flask,希望能返回循環次數,報錯: TypeError: 'int' object is not callable
代碼:
app=Flask(__name__)
@app.route('/')
def index():
hah = 0
print('hello word!')
return hah
解決方案:
app=Flask(__name__)
@app.route('/')
def index():
hah = 0
print('hello word!')
return str(hah)
本文轉自“python flask 報錯: TypeError: 'int' object is not callable_其他語言_編程問答”