title: How to print data from SQLite3 in table format in python VS CODE
body: <p>How can I print data in table format with headers? Like in the photo I posted here<a href="https://i.stack.imgur.com/LaMCF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LaMCF.jpg" alt="enter image description here" /></a></p>
  <p>Is it even possible? My code here:</p>
  <pre><code>    conn = sql.connect(&quot;register.db&quot;)
      cur = conn.cursor()
      cur.execute(&quot;SELECT * FROM datas ORDER BY lastname&quot;)
      record = cur.fetchall()
      for item in record:
          print(item[0],&quot;  &quot;,item[1],&quot;  &quot;,item[2],&quot;  &quot;,item[3],&quot;  &quot;,item[4])
      print(&quot;Wpisz nr id: &quot;)
      conn.commit()
      conn.close()
  </code></pre>