How exactly is SELECT blah, blah FROM table stored in a python file
<pre><code>query_string = 'SELECT item_id, item_name, description, item_price FROM valve_list'
</code></pre>

<p>* valve_list is a database table.</p>

<p>The code above is in a python file, how exactly does it stores the data? is it a list containing a list for each item in my database table? like this?</p>

<pre><code>query_string = [[item_id, item_name, description, item_price], [item_id, item_name, description, item_price], [item_id, item_name, description, item_price], [item_id, item_name, description, item_price]]
</code></pre>

<p>How exactly is this stored?</p>

<p>At the moment "query_string" is just a var. You typically need to pass the string to an object which has a connection to a database and executes on the database, typically a cursor. The cursor fetches a result set which can be iterated over to produce the database output.</p>

python mysql sqlite sqlite3