I am new to python web applications. I am using Bottlepy for my web application and request for extracting variables from URLs. I extracted the variable first=request.query.first. I can return the value of the variable but when I want to use it in if condition it always fails and else block is executed.
URL: http://127.0.0.1:8080/h?first="hi"
@app.route('/h')
def test():
first=request.query.first
if first == "hi":
return "passed"
else:
return "fail"
I will appreciate your help regarding the problem thank you.
ifstatement, simply print out the value offirst.