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

print('Python - customers:')
con = sqlite3.connect('test.db')
c = con.cursor()
c.execute('''SELECT name,address
             FROM customers''')
for row in c.fetchall():
    print('%s : %s' % (row[0], row[1]))
con.commit()
con.close()
