Answer the question
In order to leave comments, you need to log in
What is wrong with this check in the loop?
Here is the code
def get_all_users_First(chat_id_user):
db.cursor.execute("SELECT chat_user_id FROM users")
rows = db.cursor.fetchall()
print(rows)
for row in rows:
print(chat_id_user)
print(row)
print(rows)
if chat_id_user == row:
print('True')
return True
else:
print('false')
return False
Answer the question
In order to leave comments, you need to log in
if chat_id_user == row[0]:
It looks like the first elements are the sameAnd not identical, and not elements.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question