input: Write a function to create a Flask web application that takes user input and generates an HTML page displaying the input. If the request method is POST, retrieve the input from the form and render it on the result.html page. If the request method is GET, render the index.html page.
  
  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)
  
  assert home() == render_template('index.html')
  assert home() == render_template('result.html', input_text='hello')
  assert home() == render_template('result.html', input_text='')
  assert home() == render_template('index.html')
output: 
  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')
  