I query data from database from one colomn and I want use them but I do know how to extract them.
[(725696042,), (706284799,), (705263536,), (706705005,)]
I what to get the results like this
725696042, 706284799, 705263536, 706705005
I query data from database from one colomn and I want use them but I do know how to extract them.
[(725696042,), (706284799,), (705263536,), (706705005,)]
I what to get the results like this
725696042, 706284799, 705263536, 706705005
Not sure I get you right but this is what i understood:
a = [(725696042,), (706284799,), (705263536,), (706705005,)]
a[0] = (725696042,)
a[0][0] = 725696042
a[1] = (706284799,)
a[1][0] = 706284799
....
This way you can access your elements to extract values
I believe this is what you're looking for.
list1 = [(725696042,), (706284799,), (705263536,), (706705005,)]
list2 = []
for i in list1:
list2.append(i[0])
print(list2)
Output:
[725696042, 706284799, 705263536, 706705005]