new_contents: from flask import Flask, redirect, render_template, request, url_for
  
  app = Flask(__name__)
  app.config["DEBUG"] = True
  
  comments = []
  
  @app.route('/', methods=["GET", "POST"])
  def index():
      if request.method == "GET":
          return render_template("main_page.html", comments=comments)
  
      comments.append(request.form["contents"])
      return redirect(url_for('index'))
  
subject: Create flask_app2.py