import sqlite3 con = sqlite3.connect('dump.db') cur = con.cursor() for row in con.execute("select artist, album, title from lastfm"): print row