combining commands:

Alan Green web.mail at lycos.com
Mon May 28 23:40:08 EDT 2001


kasper37 at caffeinedreams.com wrote in message news:<a258a558.0105281449.782cfc33 at posting.google.com>...
> is there any way to combine these three commands into 1 line?
> 
> c.execute( "SELECT COUNT(*) from CONCENTRIC" )
> temp = c.fetchone()
> print( temp[0] )

If you really, really need to, this should do the trick.

print (c.execute("SELECT COUNT(*) from CONCENTRIC"), c.fetchone()[0])[1]

a



More information about the Python-list mailing list