import sqlite3 db = sqlite3.connect('bookshop.db') db.close().py
"When SQLite connection is closed explicitly by code or implicitly by program exit then any outstanding transaction is rolled back. (The rollback is actually done by the next program to open the database.) If there is no outstanding transaction open then nothing happens."Considering this, do you think you need the
db.close(), or is it simply good practise to do so? Discuss.