Answer the question
In order to leave comments, you need to log in
How to get cells into a variable?
I ran into such a problem, I need to get several url addresses (cells from the database) that are attached to 1 ID and put them in the list so that I can use them comfortably later, but as a result I get a tuple.
photoUrl = []
for item in cur.execute("SELECT `url` FROM `photo` WHERE (id = ...);")
photoUrl.append(item)
print(photoUrl)
[('url1',)]
[url1]
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