>> Yes, you are right; the code isnt working for 'abcdba';
>> So what should I do to rectify it.
>
> Try walking through the code by hand so you understand why it is
> failing. Then maybe you can figure out how to fix it. It's important to
> learn to find and fix errors yourself.
Hi Asrar,
On
Asrarahmed Kadri wrote:
> Yes, you are right; the code isnt working for 'abcdba';
> So what should I do to rectify it.
Try walking through the code by hand so you understand why it is
failing. Then maybe you can figure out how to fix it. It's important to
learn to find and fix errors yourself.
Asrarahmed Kadri wrote:
>
> Hi,
>
> Here is a code that reports whether the string is a palindrome or not. I
> have posted it to help people new to programming ( i am also a newbie)
> to understand the logic and comment on it.
>
> Share and expand your knowledge as well as understanding...
>
def pal(spam): return spam == spam[::-1]
;-)
--
Cheers,
Simon B
[EMAIL PROTECTED]
http://www.brunningonline.net/simon/blog/
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi,
Here is a code that reports whether the string is a palindrome or not. I have posted it to help people new to programming ( i am also a newbie) to understand the logic and comment on it.
Share and expand your knowledge as well as understanding...
Happy scripting
Regards,
Asrar
Cod