How to auto refresh html table fields rendered with a for loop in flask?

Solution
    @app.route("/table_list")
    def table_list():
        return render_template("index.html")
    
    @app.route("/get_list")
    def get_list():
        position_list = ["a", "b", "c", "d"]
        return make_response({"output": position_list})