On Mon, Sep 26, 2011 at 12:00 PM, StevenJ Hennessy <
stevenhenne...@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.

HTH,
Wayne

(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)
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to