input: Write a function to create a Flask application that handles form submissions with fields Name, Email, and Phone, and stores the data in an SQLite database. If the data is successfully stored, redirect to the homepage, otherwise raise an error.
  app.route('/submit', methods=['POST'])
  assert create_flask_app().route['/submit']("John", "john@example.com", "123-456-7890")=='/', create_flask_app().route['/submit']("John", "john@example.com", "123-456-7890")=='/', create_flask_app().route['/submit']("John", "john@example.com", "123-456-7890")=='/', create_flask_app().route['/submit']("John", "john@example.com", "123-456-7890")=='/'.
output: 
  def create_flask_app():
      from flask import Flask, request, redirect
      import sqlite3
  
      app = Flask(__name__)
  
      @app.route('/submit', methods=['POST'])
      def submit():
          name = request.form['Name']
          email = request.form['Email']
          phone = request.form['Phone']
  
          conn = sqlite3.connect('data.db')
          cursor = conn.cursor()
          cursor.execute('''
              CREATE TABLE IF NOT EXISTS users (
                  id INTEGER PRIMARY KEY AUTOINCREMENT,
                  name TEXT NOT NULL,
                  email TEXT NOT NULL,
                  phone TEXT NOT NULL
              )
          ''')
          cursor.execute('INSERT INTO users (name, email, phone) VALUES (?, ?, ?)', (name, email, phone))
          conn.commit()
          conn.close()
  
          return redirect('/')
  
      return app
  