Hello, studying the book on Python, came across such code:
from flask import Flask app = Flask(__name__) @app.route('/') def hello() -> str: return 'Hello world from Flask' app.run() Here (in the book) it is indicated that "the Flask class needs to know the current value of the name when a new Flask object is created, so it must be passed in the argument, which we did" - I didn’t understand why.
Well and accordingly, I also did not understand how the route works. Explain, please, as clearly as possible.