Yet Another Software Challenge

Thierry machicoane at gmail.com
Tue May 15 09:32:54 EDT 2007


On May 14, 3:40 pm, Paul McGuire <p... at austin.rr.com> wrote:
>
> In Riddle 2, the "global" declarations are unnecessary, as you are
> only referencing the globally-defined vars for read.
>
> Also in Riddle 2, I would replace
>     for s in alphabet: indices[s] = alphabet.index(s)
> with
>     indices = dict( (s,i) for i,s in enumerate(alphabet) )
>
> (I see part of your Python Challenge as giving new Pythoners something
> to cut their teeth on, and so this is an opportunity for giving
> examples of good style.)
>
> I do enjoy these challenges, they are quite addicting. :)
>
> -- Paul

Hi Paul,

Many thanks for your feedback and your example of good Python style.

Even though the challenge is opened to any language practitioner, I
must confess that I personally prefer Python and that languages like
Python and Ruby are likely to be the most effective to solve the
riddles.

Don't hesitate to report any issue you could find.

Enjoy. Cheers. Thierry




More information about the Python-list mailing list