input: Write a function to implement a Flask application that accepts form data for Name, Email, and Phone, and stores this data in an SQLite database. The application should have a route for the home page that returns an index.html template and a route for handling the form submission. The database should be named 'data.db' and the table should be named 'data' with columns 'name', 'email', and 'phone'.
  assert create_flask_app()=="""
  from flask import Flask, render_template, request, redirect
  import sqlite3
  
  app = Flask(__name__)
  
  @app.route('/')
  def home():
   return render_template('index.html')
  
  @app.route('/submit', methods=['POST'])
  def submit():
   name = request.form.get('name')
   email = request.form.get('email')
   phone = request.form.get('phone')
   
   conn = sqlite3.connect('data.db')
   cur = conn.cursor()
   
   cur.execute("INSERT INTO data (name, email, phone) VALUES (?, ?, ?)", (name, email, phone))
   conn.commit()
   
   return redirect('/')
  	
  if __name__ == '__main__':
   app.run(debug=True)
  """
  assert format_flask_app().count("render_template")==1
  assert format_flask_app().count("request.form.get")==3
  assert format_flask_app().count("@app.route")==2
  assert format_flask_app().count("sqlite3")==1
  assert format_flask_app().count("INSERT INTO data")==1
  assert format_flask_app().count("redirect('/')")==1
  assert format_flask_app().count('app.run(debug=True)')==1
output: 
  def create_flask_app():
      from flask import Flask, render_template, request, redirect
      import sqlite3
  
      app = Flask(__name__)
  
      @app.route('/')
      def home():
          return render_template('index.html')
  
      @app.route('/submit', methods=['POST'])
      def submit():
          name = request.form.get('name')
          email = request.form.get('email')
          phone = request.form.get('phone')
          
          conn = sqlite3.connect('data.db')
          cur = conn.cursor()
          
          cur.execute("INSERT INTO data (name, email, phone) VALUES (?, ?, ?)", (name, email, phone))
          conn.commit()
          
          return redirect('/')
          
      if __name__ == '__main__':
          app.run(debug=True)
      
      return """
  from flask import Flask, render_template, request, redirect
  import sqlite3
  
  app = Flask(__name__)
  
  @app.route('/')
  def home():
   return render_template('index.html')
  
  @app.route('/submit', methods=['POST'])
  def submit():
   name = request.form.get('name')
   email = request.form.get('email')
   phone = request.form.get('phone')
   
   conn = sqlite3.connect('data.db')
   cur = conn.cursor()
   
   cur.execute("INSERT INTO data (name, email, phone) VALUES (?, ?, ?)", (name, email, phone))
   conn.commit()
   
   return redirect('/')
      
  if __name__ == '__main__':
   app.run(debug=True)
  """
  