On 19/04/13 23:16, emile wrote:

The gotcha with this approach is the border case of self paired words
that aren't pairs.  (pop,wow,mom,etc)

yeah, but those exceptions are easy to catch as you generate the reversed list:

if reversed(word) == word

And its a bit of a moot point whether you should
perhaps count a palindromic word as a pair of itself...


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to