5 ms·
You just need to create the file first! >>> open("data.db", "w+").close() >>> db = sqlite3.connect("/data.db") >>> db <sqlite3.Connection objec
by benno128 3y ago
You just need to create the file first!
>>> open("data.db", "w+").close()
>>> db = sqlite3.connect("/data.db")
>>> db
<sqlite3.Connection object at 0x8b3fd8>
- simonw 3y agoOh cool! Regular Python doesn't need me to create the file first, I wonder why this works differently.