On 2012-10-25, Neil Cerutti <ne...@norwich.edu> wrote:
> Try defeating the following with arithmetic:
>
> def is_palindrom(n):
>    s = str(n)
>    return s = s[::-1]

Sorry for the typos. It should've been:

def is_palindrome(n):
   s = str(n)
   return s == s[::-1]

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to