-4

My Sqlite3 database is giving me (type,) instead of "type" when I'm trying to print something in the database (note that the "type" thing is from the database)

here's my code :

    c.execute("SELECT type FROM accounts")
    acctype = c.fetchall()
    print(acctype[0])

the output is (type,)

SIDAL
  • 13
  • 6

1 Answers1

0

acctype is a list of tuples so:

print(acctype[0][0])
Sunderam Dubey
  • 1
  • 11
  • 20
  • 40
PChemGuy
  • 1,582
  • 3
  • 6
  • 18