is_palindrome(s) that recursively checks whether a lowercase alphanumeric string s reads the same forwards and backwards, by comparing its first and last characters and recursing inward — not by reversing the whole string at once.is_palindrome('racecar')True
Peels 'r'=='r', then 'a'=='a', then 'c'=='c', leaving the single middle character 'e'.
is_palindrome('hello')False
'h' != 'o' at the very first comparison.
Base case: len(s) <= 1, return True.
Recursive case: s[0] == s[-1] and is_palindrome(s[1:-1]).