>>>>> "Kent" == Kent Johnson <[EMAIL PROTECTED]> writes:
Kent> if frequency.has_key(word):
Kent> frequency[word] += 1
Kent> else:
Kent> frequency[word] = 1
This is a good place to use 'get' method of dict:
frequency[word] = frequency.get(word,0) + 1
--
Ville Vainio http://tinyurl.com/2prnb
--
http://mail.python.org/mailman/listinfo/python-list
