In python, when using sqlite3 where are databases stored physically?
Question: Sorry for the basic questions. I'm starting to work with Python. I'm using
Windows 10, Python 3.5, Notepad++ as editor. Python is installed in
`z:\python35` and scripts are in `z:\python\sqlite`, then my script is really
simple:

    
    
    import sqlite3
    conn = sqlite3.connect('sample.db')
    c = conn.cursor()
    c.execute("CREATE TABLE example (name VARCHAR)")
    conn.close()
    

When I run the script inside Notepad++ (run as administrator) I execute
`z:\python35\python.exe -i "$(FULL_CURRENT_PATH)"`. Looks like the script runs
correctly, since it does nothing the first time run, but the next time it
says:

**`sqlite3.OperationalError: table example already exits`**

And that's okay because I wanted to create the database and the table. Thing
is, where does this **`sample.db`** is stored? I don't find it in the python
directory or my projects directory. Not even by searching in Windows.

How can I delete the whole database?


Answer: It will be in the current working directory. You can see what this is by

    
    
    import os
    print(os.getcwd())
    

Once you know the directory you can find and delete the `sample.db` file.

