import sqlite3
import config
import os.path
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
db_path = os.path.join(BASE_DIR, f"{config.database_name}")
connection = sqlite3.connect(db_path)
cursor = connection.cursor()
"""db = sqlite3.connect(config.database_name)
cursor = db.cursor()"""
question = cursor.execute('SELECT qustion FROM qustions')
answer = cursor.execute('SELECT right_answer FROM qustions')
connection.commit()
cursor.execute('SELECT question FROM answers')
print(answer)
Вот полный код, вроде заменил всё