๐งช Programming
โฑ๏ธ 29s
๐ 393 chars
๐ฆ 4.3B
๐ง Q4_K_M
Prompt: Write a Python function is_palindrome(s) that returns True if s is a palindrome. One test case.
Response
```python
def is_palindrome(s):
"""
Checks if a string is a palindrome (reads the same backward as forward).
Args:
s: The input string.
Returns:
True if s is a palindrome, False otherwise.
"""
processed_string = ''.join(filter(str.isalnum, s)).lower()
return processed_string == processed_string[::-1]
# Test case
print(is_palindrome("racecar")) # Output: True
```