#利用python的切片 1行~~
def isPalindrome1(s):
""" return is palindrome or not """
return s == s[::-1]
# 递归
def isPalindrome2(s):
""" return is palindrome or not """
if len(s) <= 1:
print 'len = 1'
return True
else:
print 's[-0]=',s[0],' s[-1]=',s[-1]
return s[0] == s[-1] and isPalindrome(s[1:-1])