def is_palindrome(s):
if len(s) <= 1:
return True
else:
return s[0] == s[-1] and is_palindrome(s[1:-1])
print(is_palindrome('racecar'))
print(is_palindrome('hello'))
For further actions, you may consider blocking this person and/or reporting abuse
Latest comments (0)