# Collection of code snippets by Arne Vajhøj 
# (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import sqlite3

print('SQLite from Python')
con = sqlite3.connect('test.db')
c = con.cursor()
c.execute('SELECT f1,f2 FROM t1')
for row in c.fetchall():
    print('%d %s' % (row[0], row[1]))
con.commit()
con.close()
