On Fri, Jun 21, 2013 at 7:15 PM, Peter Otten <__pete...@web.de> wrote:
> Combining these modifications:
>
> for line in f:
>     word = line.strip()
>     if is_palindrome.is_palindrome(word):
>         print word

Minor quibble: I wouldn't use the name 'word' here, unless you're
expecting the file to consist of one-word lines (such as DICTOT.DIC
from old PMMail). For detecting phrase/sentence palindromes, I'd keep
the name 'line'.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to