title: In python's sqlite3 module, will using cursor.fetchone() as the condition for a while loop fetch a row?
body: <p>I am using python's sqlite3 module.</p>
  
  <p>I want to iterate through the rows in my table until none are left.  I want to do this one at a time instead of using <code>fetchall</code> because the table is quite large. I read in the python sqlite3 documentation that <code>curs.fetchone()</code> returns <code>None</code> when no rows are left in the cursor's selection.</p>
  
  <p>So I had the idea to run my code in a <code>while fetchone():</code> loop, with the 'actual' <code>fetchone()</code> call occuring inside the loop, like so:</p>
  
  <pre><code>while c.fetchone():
      row = c.fetchone()
      print(foo(row))
  </code></pre>
  
  <p>I can't tell if this loop is actually fetching a row once in the while statement and once in the body, or if it is only in the body. Which one is it?</p>