使用斜杠(/)。因此,它成为一个规范的URL。因此,使用 /python 或 /python/ 返回相同的输出
@app.route('/python/')
def hello_python():
return 'Hello Python'
使用斜杠(/)。因此,它成为一个规范的URL。因此,使用 /python 或 /python/ 返回相同的输出
@app.route('/python/')
def hello_python():
return 'Hello Python'