input: Write a function to create an application using Python and Flask that submits form data and stores it in an SQLite database. The form has three elements: Name, Email, and Phone. The application should render a home page, accept form submissions via POST method, and insert the form data into the database. If successful, it should redirect to the home page.
  
  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 submit("John Doe", "john@example.com", "1234567890")==redirect('/')
  assert submit("Jane Smith", "jane@example.com", "0987654321")==redirect('/')
  assert submit("Alice Johnson", "alice@example.com", "5555555555")==redirect('/')
output: 
  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('/')
  