[Tutor] Find all strings that....
Alexander
rhettnaxel at gmail.com
Thu Nov 10 19:14:21 CET 2011
> On 11/10/11, Original Poster Alexander Etter <rhettnaxel at gmail.com> 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.
>> 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.
>> Thanks for reading,
>> Alexander
On 10 Nov 2011, at 16:14, Alex Hall wrote:
> What about just grabbing a bit text file, such as from Project
> Gutenberg (sorry for the possibly incorrect spelling)?
Spelling is correct. No worries.
Or copying the
> text from a large web-page and pasting it into a text file?
I will give this a try sometime, thanks for the suggestions.
However, as a member of this mailing list, it is my duty to tell you both
that you have top posted in reply to the initial question. Top posting is
frowned upon. Consider when John Doe finds this thread, sees the subject
line, finds it appealing and decides to read it; only to find the first
thing he reads is a response from somebody and not the Original post. Now
Mr. Doe is scrambling through the file confused about who sent what first
and where the original question is. Maybe me typing in the middle of your
reply is bad, but it is distinguishable from your email and I am finding it
relevant.
> --
> Have a great day,
> Alex (msg sent from GMail website)
> mehgcap at gmail.com; http://www.facebook.com/mehgcap
______________
On Thu, Nov 10, 2011 at 11:28 AM, Rich Lovely <roadierich at googlemail.com>wrote:
> 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.
>
>
> Rich "RoadieRich" Lovely
>
> There are 10 types of people in the world:
> Those who know binary,
> Those who do not,
> And those who are off by one.
>
> Thanks Rich. I'm on Ubuntu 11.04 and Trisquel. And will make use of that
file. It's an interesting collection of words, but certainly missing some
of what I would want to see. Like "better" isn't in there, but "Bette" is.
Anyway at least I can start coding with your suggestion. Thanks. And if you
haven't seen above, please don't top post.
Au revoir.
Alexander E.
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111110/10c3431e/attachment.html>
More information about the Tutor
mailing list