get a simple list from sqlite in python (not a list of tuples)
Posted
by Jeremiah Rose
on Stack Overflow
See other posts from Stack Overflow
or by Jeremiah Rose
Published on 2010-05-18T01:11:18Z
Indexed on
2010/05/18
1:20 UTC
Read the original article
Hit count: 264
it's annoying how sqlite always returns a list of touples! i can see the why this is necessary, but when i am querying a single column, how do i get a plain list?
e.g cursor.fetchall()
returns [(u'one',), (u'two',), (u'three',)]
from this, how do i get the simple list [u'one', u'two', u'three']
?
© Stack Overflow or respective owner