Answer the question
In order to leave comments, you need to log in
How to get only numbers from an array?
The bottom line is this, I pull out id numbers from the SQlite3 database that are added to my array, and I need separate numbers, please tell me how this can be done?
Here is the code:
searching_object = f"{message.text}"
cur.execute(f"SELECT id FROM ads WHERE feature1 = '%s'" % searching_object)
result = cur.fetchall()
print(result) # Результат: [(3,), (4,), (5,)]<code lang="python">
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