<div class="gmail_quote">On Fri, Nov 11, 2011 at 1:21 PM, Francesco Loffredo <span dir="ltr">&lt;<a href="mailto:fal@libero.it">fal@libero.it</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

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 &quot;target&quot; with at most N such operations (better:  the subset of all words in S with an edit distance from &quot;target&quot; &lt;= N) is a very interesting and challenging task. Thank you (and your friend!) for this exercise, I&#39;ll give it a try.<br>
</blockquote></div><br>There are some standard library tools that make this pretty easy.  Take a look into difflib if you&#39;re interested.  As always, there&#39;s nothing wrong with doing it yourself so that you understand it better, of course.<br>
<br>-- <br>Jerry<br>