title: Python Sqlite3: INSERT INTO table VALUE(dictionary goes here)
body: <p>I would like to use a dictionary to insert values into a table, how would I do this? </p>
  
  <pre><code>import sqlite3
  
  db = sqlite3.connect('local.db')
  cur = db.cursor()
  
  cur.execute('DROP TABLE IF EXISTS Media')
  
  cur.execute('''CREATE TABLE IF NOT EXISTS Media(
                  id INTEGER PRIMARY KEY, title TEXT, 
                  type TEXT,  genre TEXT,
                  onchapter INTEGER,  chapters INTEGER,
                  status TEXT
                  )''')
  
  
  values = {'title':'jack', 'type':None, 'genre':'Action', 'onchapter':None,'chapters':6,'status':'Ongoing'}
  
  #What would I Replace x with to allow a 
  #dictionary to connect to the values? 
  cur.execute('INSERT INTO Media VALUES (NULL, x)'), values)
  cur.execute('SELECT * FROM Media')
  
  meida = cur.fetchone()
  
  print meida
  </code></pre>