Answer the question
In order to leave comments, you need to log in
Problem with fetchall(). Can you help?
con=sqlite3.connect('users.db')
cur=con.cursor()
cur.execute("SELECT name FROM reviews")
name=cur.fetchall()[1]
cur.execute("SELECT text FROM reviews")
text = cur.fetchall()[1]
print(f'{name}:\n{text}')
Answer the question
In order to leave comments, you need to log in
So?
con=sqlite3.connect('users.db')
cur=con.cursor()
cur.execute("SELECT name FROM reviews")
name=cur.fetchall()[1][0]
cur.execute("SELECT text FROM reviews")
text = cur.fetchall()[1][0]
print(f'{name}:\n{text}')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question