How to create a new database using python and sqlite3 February 24, 2023 by Tarik The code you give does create 'D:\\aaa.db' if it doesn’t exist.