sqlite3 is giving me (type,) instead of "type"
Question:
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,)
Answers:
acctype is a list of tuples so:
print(acctype[0][0])
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,)
acctype is a list of tuples so:
print(acctype[0][0])