title: More specific searching in sqlite3 for python
body: <p>I am using sqlite3 in python to quickly search through many values (it has been a lifesaver). The database has two entries per row: 'A' and 'B'. 'B' is a sequence of letters (seq).</p>
  
  <p>I would like to count the number of times my search query of length l is like the first l+1 characters in 'B'.</p>
  
  <p>My search code is currently:</p>
  
  <pre><code>for row in c.execute('SELECT * FROM my_db WHERE seq LIKE ?', (t+'%',)):
  </code></pre>
  
  <p>which will check if my search query is present in 'B' but does not give me any further information.</p>
  
  <p>I have tried to find the answer elsewhere, including stack overflow and sqlite3 documentation. Thank you.</p>
  
  <p>Edit: Hello, it would be beneficial if those who are down voting my question can tell me why or direct me towards a resource that I have I may not have seen. Thank you.</p>