How can I print data in table format with headers? Like in the photo I posted here
Is it even possible? My code here:
conn = sql.connect("register.db")
cur = conn.cursor()
cur.execute("SELECT * FROM datas ORDER BY lastname")
record = cur.fetchall()
for item in record:
print(item[0]," ",item[1]," ",item[2]," ",item[3]," ",item[4])
print("Wpisz nr id: ")
conn.commit()
conn.close()
print(record)?