📅  最后修改于: 2022-03-11 14:46:54.056000             🧑  作者: Mango
def isPalindrome(string):
#termination condition: the string is one character or less
if (len(string) <= 1):
return True
if (string[0] == string[-1]):
return isPalindrome(string[1:-1])
else:
return False