Answer the question
In order to leave comments, you need to log in
How to search a list in the database?
In VK api there is a variable event.message.text, which is equal to the user's message (in this case, 'hello boyar'). I'm splitting this message by spaces, making it a list:
['hello', 'botyara']
There are rows in my database:
botyara
bot
Actually, I need to check if there is a row from the list in the database (sqlite3) via if and issue a response.
How can this be done?
(If possible, you need to check if there are several similar lines)
event.message.text.split(' ')
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