[Tutor] Code for checking whether an input string is a palindrome or not.

Simon Brunning simon at brunningonline.net
Fri Oct 13 16:46:21 CEST 2006


def pal(spam): return spam == spam[::-1]

;-)

-- 
Cheers,
Simon B
simon at brunningonline.net
http://www.brunningonline.net/simon/blog/


More information about the Tutor mailing list