large dictionary creation takes a LOT of time.

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Fri Apr 29 07:17:14 EDT 2005


Ville Vainio:
> This is a good place to use 'get' method of dict:
> frequency[word] = frequency.get(word,0) + 1

I think Kent Johnson is longer, but a bit faster...

Bye,
Bearophile




More information about the Python-list mailing list