技术小黑屋

How to Create a .db File in Python With Sqlite3

How to create a .db file in Python with sqlite3?Actually It’s really easy.
Run the following code

1
2
import sqlite3
sqlite3.connect('./test.db')

After running the above code,the test.db file will be created if it does not exist.
Of course,you have the proper permission to create the file.

我的博客即将搬运同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=2t07a740wrok0


我的知乎 Live 推荐