combining commands:

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

kasper37 at wrote in message news:<a258a558.0105281449.782cfc33 at>...
> 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]


More information about the Python-list mailing list