我如何傳遞myvariable給app下面的代碼?myvariable是來自其余代碼而不是從 URL 接收的變數。
@app.route("/myrout", methods=["GET"])
def myfunction(myvariable):
uj5u.com熱心網友回復:
global myvariable=8
@app.route("/myrout", methods=["GET"])
def myfunction():
global myvariable
local_variable=myvariable
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/320755.html
上一篇:嘗試在python中繪制肯尼亞國旗顏色,遇到名稱錯誤?
下一篇:通過動態SQL設定SQL變數
