On Nov 10, 2011, at 13:52, Francesco Loffredo <f...@libero.it> wrote:
> Alexander Etter wrote: >> >> Hi. My friend gave me a good wake up exercise which I do not want you to >> solve for me: find all strings which can be converted to alpha with at most >> two operations, where alpha is some string constant, and a substring of at >> least length three of alpha must be in the answers. > I'd like to try this exercise too; would you mind defining "operations" more > specifically, please? > Given a sufficiently broad meaning of "operations" (e.g. operation = any > function call) > then any word can be converted into any given word with at most ONE operation. Consider an operation not as a function. A function could easily contain more than two operations. An operation would remove two letters. An operation would add one letter. Etc. Alexander > >> So, my question is: is there a library or .txt dictionary ( not the data >> type, rather the merriam webster kind ) I can use to test my script on? I'd >> imagine this library/dictionary to contain thousands of words. Not random >> words. > http://www.cs.nmsu.edu/~hfugal/cs167/labs/words.txt >> Thanks for reading, >> Alexander > More thanks for writing! > Francesco > > > ----- > Nessun virus nel messaggio. > Controllato da AVG - www.avg.com > Versione: 2012.0.1869 / Database dei virus: 2092/4606 - Data di rilascio: > 09/11/2011 > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor