[Tutor] Fw: Issues With Map Reduce

Wayne Werner waynejwerner at gmail.com
Mon Oct 3 20:04:09 CEST 2011

On Mon, Sep 26, 2011 at 12:00 PM, StevenJ Hennessy <
stevenhennessy at sbcglobal.net> wrote:

> <snip>
> Am I on the right track?
Of course we don't do homework here, and we're happy to give pointers in the
right direction.

I don't see anything completely wrong with your code, and it sounds like
you'll probably end out with the correct count of palindromes. A different
approach might involve the dict.get() method. You can find out more
information through

>>> help(dict.get)

If you want to get the most benefit (and that's usually the point of
homework assignments), I'd suggest writing two different functions - one
doing it the way you suggested, with set, and the other using dict.get.


(also, if you set your email program to send text-only messages, it might
help. Many people on this list get annoyed when an HTML message comes down
the pipe - especially since it usually mangles your Python code)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111003/46a787eb/attachment.html>

More information about the Tutor mailing list