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")
> links=aia.fetchall()
> 
> 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[0] for x in links]

HTH,

-- 
Carsten Haese
http://informixdb.sourceforge.net


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to