input: Write a python function to insert, read, update, and delete data from an SQLite database using Flask. 
  assert create_data({"data": "example"}) == {'inserted': {'data': 'example'}}
  assert read_data(1) == {'id': 1, 'data': ('example',)}
  assert update_data(1, {"data": "updated_example"}) == {'updated': {'data': 'updated_example'}}
  assert delete_data(1) == {'deleted': 1}
output: from flask import Flask, request, jsonify
  import sqlite3
  
  app = Flask(__name__)
  
  def init_db():
      conn = sqlite3.connect('example.db')
      c = conn.cursor()
      c.execute('''
          CREATE TABLE IF NOT EXISTS data (
              id INTEGER PRIMARY KEY AUTOINCREMENT,
              data TEXT NOT NULL
          )
      ''')
      conn.commit()
      conn.close()
  
  init_db()
  
  @app.route('/create', methods=['POST'])
  def create_data():
      content = request.json
      conn = sqlite3.connect('example.db')
      c = conn.cursor()
      c.execute('INSERT INTO data (data) VALUES (?)', (content['data'],))
      conn.commit()
      conn.close()
      return jsonify({'inserted': content})
  
  @app.route('/read/<int:id>', methods=['GET'])
  def read_data(id):
      conn = sqlite3.connect('example.db')
      c = conn.cursor()
      c.execute('SELECT * FROM data WHERE id=?', (id,))
      row = c.fetchone()
      conn.close()
      if row:
          return jsonify({'id': row[0], 'data': row[1:]})
      return jsonify({'error': 'Not found'}), 404
  
  @app.route('/update/<int:id>', methods=['PUT'])
  def update_data(id):
      content = request.json
      conn = sqlite3.connect('example.db')
      c = conn.cursor()
      c.execute('UPDATE data SET data=? WHERE id=?', (content['data'], id))
      conn.commit()
      conn.close()
      return jsonify({'updated': content})
  
  @app.route('/delete/<int:id>', methods=['DELETE'])
  def delete_data(id):
      conn = sqlite3.connect('example.db')
      c = conn.cursor()
      c.execute('DELETE FROM data WHERE id=?', (id,))
      conn.commit()
      conn.close()
      return jsonify({'deleted': id})
  
  if __name__ == '__main__':
      app.run(debug=True)