Answer the question
In order to leave comments, you need to log in
Why does such a response come when working with sqlite3?
Greetings!
I study work of a python from a DB.
I write this code -
import sqlite3
import config
db = sqlite3.connect(config.database_name)
cursor = db.cursor()
"""
question = cursor.execute('SELECT qustion FROM qustions')
answer = cursor.execute('SELECT right_answer FROM qustions')"""
cursor.execute("""CREATE TABLE IF NOT EXISTS users(
userid INT PRIMARY KEY,
fname TEXT,
lname TEXT,
gender TEXT);
""")
db.commit()
cursor.execute("""INSERT INTO users(userid, fname, lname, gender)
VALUES('00001', 'Alex', 'Smith', 'male');""")
db.commit()
answer = cursor.execute('SELECT userid FROM users')
print(answer)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question