title: sqlite3 - creating a cursor and executing
body: <blockquote>
    <p>Hello! new to SQLite3</p>
    
    <p>there are some example programs where a "cursor" is created before
    executing.. and other programs that do not create a cursor.</p>
    
    <p>QUESTION: do I need to create a "cursor" or it can be omitted?</p>
    
    <p>Example below without a cursor:</p>
  </blockquote>
  
  <pre><code>    con = sqlite3.connect(":memory:")
  
      con.execute("create table person(firstname, lastname)")
  </code></pre>
  
  <blockquote>
    <p>Example below WITH a cursor:</p>
  </blockquote>
  
  <pre><code>    db = sqlite3.connect('test.db')
      db.row_factory = sqlite3.Row
      db.execute('drop table if exists test')
      db.execute('create table test(t1 text, i1 int)')
      db.execute('insert into test (t1, i1) values (?,?)', ('one', 1))
      db.execute('insert into test (t1, i1) values (?,?)', ('two', 2))
      db.commit()
      cursor = db.execute('select * from test order by t1')
      for row in cursor:
          print(dict(row))
  </code></pre>