input: Write a function to create a Python Flask web application that takes user input and generates an HTML page displaying the input. The function should set up a route to handle both GET and POST requests, and use templates to render the input on an HTML page. If the request method is POST, it should retrieve the input and render it on a result page; otherwise, it should render an index page.
  
  from flask import Flask, render_template, request
  
  def create_flask_webapp():
      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')
  
      return app
  
  if __name__ == '__main__':
      app = create_flask_webapp()
      app.run(debug=True)
  
  // result.html file
  <html>
   <body>
    <h1>Your Input: </h1>
    <p>{{input_text}}</p>
   </body>
  </html>
  
  assert create_flask_webapp().config['DEBUG'] == True
  assert create_flask_webapp().url_map.strict_slashes == False
  assert set(create_flask_webapp().url_map.get('home').methods) == {'GET', 'POST'}
output: 
  def create_flask_webapp():
      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')
  
      return app
  