Re: [Tutor] Find all strings that....

2011-11-11 Thread Albert-Jan Roskam
? ~~ > >From: Jerry Hill >To: "tutor@python.org" >Sent: Friday, November 11, 2011 7:38 PM >Subject: Re: [Tutor] Find all strings that > > >On Fri, Nov 11, 2011 at 1:21 PM, Francesco Loffredo wrote: > >Anyway, taking for granted the rules contained in the edit

Re: [Tutor] Find all strings that....

2011-11-11 Thread Alexander
On Fri, Nov 11, 2011 at 1:38 PM, Jerry Hill wrote: > On Fri, Nov 11, 2011 at 1:21 PM, Francesco Loffredo wrote: > >> Anyway, taking for granted the rules contained in the edit distance >> definition (Thank you, Steven!), I think that finding in a given set S all >> words that can be converted in

Re: [Tutor] Find all strings that....

2011-11-11 Thread Jerry Hill
On Fri, Nov 11, 2011 at 1:21 PM, Francesco Loffredo wrote: > Anyway, taking for granted the rules contained in the edit distance > definition (Thank you, Steven!), I think that finding in a given set S all > words that can be converted into some given "target" with at most N such > operations (be

Re: [Tutor] Find all strings that....

2011-11-11 Thread Francesco Loffredo
Alexander Etter wrote: On Nov 10, 2011, at 13:52, Francesco Loffredo wrote: Alexander Etter wrote: Hi. My friend gave me a good wake up exercise ... I'd like to try this exercise too; would you mind defining "operations" more specifically, please? Given a sufficiently broad meaning of "oper

Re: [Tutor] Find all strings that....

2011-11-10 Thread Steven D'Aprano
Alexander Etter wrote: On Nov 10, 2011, at 13:52, Francesco Loffredo 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 co

Re: [Tutor] Find all strings that....

2011-11-10 Thread Alexander Etter
On Nov 10, 2011, at 13:52, Francesco Loffredo 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, a

Re: [Tutor] Find all strings that....

2011-11-10 Thread Francesco Loffredo
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 ans

Re: [Tutor] Find all strings that....

2011-11-10 Thread Alexander
> On 11/10/11, Original Poster 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

Re: [Tutor] Find all strings that....

2011-11-10 Thread Rich Lovely
If you're on linux or OSX, there's /usr/share/dict/words, which has a few thousand words. Although no plurals, which caught me out once. If you're on windows, it's not a hard file to find. On 10 Nov 2011, at 16:14, Alex Hall wrote: > What about just grabbing a bit text file, such as from Proj

Re: [Tutor] Find all strings that....

2011-11-10 Thread Alex Hall
What about just grabbing a bit text file, such as from Project Gutenberg (sorry for the possibly incorrect spelling)? Or copying the text from a large webpage and pasting it into a text file? On 11/10/11, Alexander Etter wrote: > > > Hi. My friend gave me a good wake up exercise which I do not wa