title: How to fetch data from sqlite using python?
body: <p>I am using this sample <a href="http://www.sqlitetutorial.net/sqlite-sample-database/" rel="nofollow noreferrer">sqlite database</a> and my code is</p>
  <pre><code>import sqlite3
  
  conn = sqlite3.connect('chinook.db')
  conn.execute(&quot;SELECT * FROM tracks&quot;)
  rows = conn.cursor().fetchall()
  </code></pre>
  <p>It should have worked, but <code>rows</code> is empty?<br />
  What am I doing wrong here?</p>