how does flask work? code example
Example 1: what is flask
These are by far the best Flask tutorials there are: https://youtube.com/playlist?list=PLzMcBGfZo4-n4vJJybUVV3Un_NFS5EOgX
Example 2: flask page
from flask import Flask # Imports flask
app = Flask(__name__) # Setting up the app
@app.route('/') # Sets the route for the page
def hello_world():
return 'Hello, World!' # Returns 'Hello, World' wheen
# you go to the '/' or main page