I have sqlite and I query two columns from a table like this:
result_set = conn.execute("SELECT time, MeanCurrent from MEASUREMENTS")
then, I want to put each column into a separate list, what I'm doing so far is this:
list1 = [record[0] for record in result_set]
list2 = [record[1] for record in result_set]
The problem is that, while list1 prints the first column perfectly, list2 appears empty, while, if I remove the first line, list2 prints the second column perfectly as well!
So it's like, after the first line execution, something changes in my query but I don't know what.
Is there any way to deal with this?
result_setandpushthe fields of therecordinto the list arrays.