Program very slow to finish

Andrew MacIntyre andymac at bullseye.apana.org.au
Sun Nov 4 21:56:29 CET 2001


"Fred" <fredNo at nospamco.com> wrote in message

> print "Number of acc: " + `len(nacc.keys())`
> print "Number of tra: " + `len(ntra.keys())`
> print "Number of stk: " + `len(nstk.keys())`
> sys.exit()

IIUC, len(nacc.keys()) is a very expensive way to get the same value as
len(nacc).

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  | Snail: PO Box 370
        andymac at pcug.org.au            |        Belconnen  ACT  2616
Web:    http://www.andymac.org/        |        Australia





More information about the Python-list mailing list