代码问题“TypeError:'int'object is not callable”哪里错了?
1个回答
展开全部
python flask 报错: TypeError: 'int' object is not callable
描述: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_其他语言_编程问答”
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询