input: Write a function to create a web application in Python using Flask that takes user input and generates an HTML page displaying the input. The function should handle both GET and POST requests, with POST being used to submit the input. If the user submits input via a form on the home page, the input should be displayed on a result page. If no input is submitted, the home page should be displayed.
  
  assert flask_app_with_input()==from flask import Flask, render_template, request
  
  app = Flask(__name__)
  
  @app.route('/', methods=['GET', 'POST'])
  def home():
      if request.method == 'POST':
          input_text = request.form.get('input_text')
          return render_template('result.html', input_text=input_text)
      return render_template('index.html')
  
  if __name__ == '__main__':
      app.run(debug=True)
output: 
  def flask_app_with_input():
      from flask import Flask, render_template, request
  
      app = Flask(__name__)
  
      @app.route('/', methods=['GET', 'POST'])
      def home():
          if request.method == 'POST':
              input_text = request.form.get('input_text')
              return render_template('result.html', input_text=input_text)
          return render_template('index.html')
  
      if __name__ == '__main__':
          app.run(debug=True)
  