一个短语是平行体,如果将所有大写字母转换成小写字母并删除所有非字母字符,读取前后相同.字母字符包括字母和数字.给出一个字符串s,返回真的是如果它是平行体,或者假的.
Sure! Here's Python code that solves the problem you described: 

```
def is_palindrome(s):
    s = ''.join(filter(str.isalnum, s.lower())) # remove non-alphanumeric and convert to lowercase
    return s == s[::-1] # check if the string is equal to its reverse 

#Example usage:
s = "A man, a plan, a canal: Panama"
print(is_palindrome(s)) # True

s = "race a car"
print(is_palindrome(s)) # False
``` 

Let me know if you have any questions!