input: Write a function to create a Flask application that allows users to submit form data containing name, email, and phone, and store this data in a SQLite database. The application should have an endpoint to display the form and another to handle the form submission. Define the necessary routes, retrieve the form data, and store it in the database.
  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 home('/') == render_template('index.html')
  assert submit('/submit', method='POST', form={'name': 'John', 'email': 'john@example.com', 'phone': '123-456-7890'}) == redirect('/')
  assert submit('/submit', method='POST', form={'name': 'Jane', 'email': 'jane@example.com', 'phone': '987-654-3210'}) == redirect('/')
output: 
  @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('/')
  