retrieve data sqlite3 into list python
<p>I want to retrieve data from sqlite3 table, this is my code, but I only get an empty list. I checked my query on the sqlite3 and it works fine there.</p>

<pre><code>import sqlite3
conn = sqlite3.connect("testee.db")
c = conn.cursor()
myquery = ("SELECT stock FROM testproduct WHERE store=3;")
c.execute(myquery)
templist=list(c.fetchall())
</code></pre>

<p>But templist is empty.</p>

<p>I found out the error just now. The database file in that directory was empty. I copied the filled in file to the directory python is running and it works fine.</p>

python sqlite sqlite3 cursor fetchall