2) Python-list doesn't like to do other people's homework.


This could be fun... :) For this problem, all you have to do is a big "if/elif/else" statement for every possible mis-spelling. If you want to get really fancy, you could put all the mis-spellings in a set() and then test the incoming word against the set for membership...For bonus points, you could use the anydbm module as a mapping from known-bad-spellings to the correct spelling so it can auto-correct for you...

Then you know if the word is mis-spelled. The rest is pretty easy. ;-)

-tkc


(or maybe this only sounds amusing if you're sleep-deprived, up with your kid in the wee hours of the morning when you'd prefer to be snoozing)

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to