Select as dictionary...
carsten at uniqsys.com
Mon Oct 1 19:21:43 CEST 2007
On Mon, 2007-10-01 at 10:13 -0700, Abandoned wrote:
> Also if i need a list id what can i do ?
> aia.execute("SELECT id, w from list")
> I want to..
> idlist=[1, 2, 3] ( I don't want to use FOR and APPEND because the
> query have 2 million result and i want to speed)
The canonical replacement for a for/append loop is a list comprehension:
idlist = [x for x in links]
More information about the Python-list