templates folder
simpleTemplate.py
from flask import *
app = Flask(__name__)
@app.route("/")
def main():
return render_template("basic.html")
app.run(debug=True)
Put the following basic.html template file into a templates folder where your Python file is saved:

templates\basic.html
<!doctype html> <h1>A rendered template</h1><br> <p>Flask will render and display this template.</p>