input: Write a function to create a Flask application that takes form data (Name, Email, Phone) as input and stores it in a SQLite database. The function should return the Flask application object. If the database connection fails, the function should return None.
  
  from flask import Flask, render_template, request, redirect
  import sqlite3
  
  def create_flask_app():
   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')
    
    try:
     conn = sqlite3.connect('data.db')
     cur = conn.cursor()
     
     cur.execute("INSERT INTO data (name, email, phone) VALUES (?, ?, ?)", (name, email, phone))
     conn.commit()
    except sqlite3.Error:
     return None
    
    return redirect('/')
  	
   if __name__ == '__main__':
    return app if sqlite3.connect('data.db') else None
  
  assert create_flask_app() is not None
output: 
  def create_flask_app():
   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')
    
    try:
     conn = sqlite3.connect('data.db')
     cur = conn.cursor()
     
     cur.execute("INSERT INTO data (name, email, phone) VALUES (?, ?, ?)", (name, email, phone))
     conn.commit()
    except sqlite3.Error:
     return None
    
    return redirect('/')
  	
   if __name__ == '__main__':
    return app if sqlite3.connect('data.db') else None
  