title: How to get queried results with Python/SQLite?
body: <p>I'm using Python/SQLite for accessing database. After running the query, and getting the result, I want to know the number of rows, the number of columns, and the name of the column from the queried result and database. </p>
  
  <p>For example if I run "SELECT * from table", and I get</p>
  
  <pre>
  id    name    number
  --------------------
  1     John    10
  2     Jay     20
  </pre>
  
  <p>I can I know that I have 2 rows, and 3 columns, and the number of columns are id/name/number?</p>
  
  <h2>ADDED</h2>
  
  <p>Based on Rafael SDM Sierra's answer, I could get the info as follows.</p>
  
  <pre><code>    description = self.cursor.description
      qr.numberOfCol = len(description) &lt;-- # of column
      for item in description:
          qr.names.append(item[0]) &lt;-- Names of column
  
      count = 0
      for row in self.cursor:
          count += 1
          qr.result.append(row)
  
      qr.numberOfRow = count &lt;-- # of row
  </code></pre>