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 -- http://mail.python.org/mailman/listinfo/python-list
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 -- http://mail.python.org/mailman/listinfo/python-list