Gnarlodious <[email protected]> writes: > I have an SQLite query that returns a list of tuples: > [('0A',), ('1B',), ('2C',), ('3D',),... > What is the most Pythonic way to loop through the list returning a > list like this?: > ['0A', '1B', '2C', '3D',...
Try:
tlist = [('0A',), ('1B',), ('2C',), ('3D',)]
alist = [x for (x,) in tlist]
--
http://mail.python.org/mailman/listinfo/python-list
