def IsPalindrome(s):
#判断一个字符串是否为回文
lens = len(s)
if lens<=1:
return True
if s[l] !=s[r]:
return False
ls += 1
rs-= 1
return True
while True:
print("enter quit to end! ")
x = input("a series of string: ")
if x == 'quit':
break
print (IsPalindrome(x))
#判断一个字符串是否为回文
lens = len(s)
if lens<=1:
return True
ls= 0
rs = lens-1
while ls<rs:if s[l] !=s[r]:
return False
ls += 1
rs-= 1
return True
while True:
print("enter quit to end! ")
x = input("a series of string: ")
if x == 'quit':
break
print (IsPalindrome(x))