2 lines
87 B
Python
2 lines
87 B
Python
def is_palindrome_r2(s):
|
|
return not s or s[0] == s[-1] and is_palindrome_r2(s[1:-1])
|