getting results into one variable

s99999999s2003 at yahoo.com s99999999s2003 at yahoo.com
Thu Nov 10 03:36:38 EST 2005


hi
the database "execute" function returns a list of logical results. Each
logical result is a list of row tuples, as explained in the documents.

everytime i use it to execute various statements, it returns me, for
example
([(0,)], [(0,)], [(0,)]) and sometimes , ([(0,)], [(0,)]) or ([(0,)])

in my call, i give
eg (a,b,c) = db.execute(stmt) so that it returns me ([(0,)], [(0,)],
[(0,)])

in python, can we do something like

a = db.execute(stmt) and then expand variable 'a'

instead of doing
(a,b) =  db.execute(stmt) for return of 2
(a,b,c) = for return of 3
(a,b,c,d) for return of 4

thanks




More information about the Python-list mailing list