Program very slow to finish

Terry Reedy tjreedy at home.com
Sat Nov 3 22:38:55 EST 2001


"Fred" <fredNo at nospamco.com> wrote in message
news:3BE41CBE.94AED22 at nospamco.com...
...
> Is there a better way to count the
> individual values than dictionaries?

Given that you want the number of different values with repeats not
counted, no
(Ie, not that I can think or or imagine thinking of).
...
>     nacc[ivacno]=None
>     ntra[idno]=None
>     nstk[stkno]=None
...
> print "Number of acc: " + `len(nacc.keys())`
> print "Number of tra: " + `len(ntra.keys())`
> print "Number of stk: " + `len(nstk.keys())`
> sys.exit()

Terry J. Reedy







More information about the Python-list mailing list