Yet Another Software Challenge
Paul McGuire
ptmcg at austin.rr.com
Mon May 14 09:40:05 EDT 2007
On May 14, 8:14 am, Thierry <machico... at gmail.com> wrote:
> For those interested in <b>programming riddles</b>, I would like to
> announce a new programming challenge I'm just launching athttp://software.challenge.googlepages.com
>
> This challenge is in its early stage and thus set to be continuously
> improved.
>
> I would be especially interested in your comments and feedbacks about
> this initiative and its relevance.
>
> Enjoy!
>
> Thierry
More feedback:
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
More information about the Python-list
mailing list