Python·100 questions

How to work with SQLite (sqlite3)?

Answer
import sqlite3; conn = sqlite3.connect('db.sqlite').
cursor.execute('SELECT ...', params).
Use parameterization, not concatenation.
conn.commit() to save.
conn.close() or use context manager.
Was this answer helpful?

More questions in this topic

Related questions from other topics