input: 
  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)
  
  
  ### Instruction:
  Create an application using Python and Flask to submit form data and store it in a database.
  
  请问如何使用Python和Flask创建一个可以提交表单数据并将其存储在数据库中的应用程序？
output:     
  @app.route('/view')
  def view():
      conn = sqlite3.connect('data.db')
      cur = conn.cursor()
      
      cur.execute("SELECT * FROM data")
      rows = cur.fetchall()
      
      conn.close()
      
      return render_template('view.html', rows=rows)
  