Looking at the default "Hello world" script on Flask's website:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
I'm very new to programming, so I don't understand how this script can work - the hello()
function isn't called anywhere, so does Flask simply display the output of the first function found? What if I wanted to display outputs from two or three functions on the page?