import sqlite3 conn = sqlite3.connect('food.db') curs = conn.cursor() curs.execute(''' CREATE TABLE IF NOT EXISTS food( id TEXT PRIMARY KEY, desc TEXT ) ''') query = 'DELETE FROM food' print query curs.execute(query) query = 'INSERT INTO food VALUES(