def is_palindrome(s: str) -> bool: temp = ''.join(x for x in s if x.isalpha()).lower() return temp[::-1] == temp
- def is_palindrome(s: str) -> bool:
return (x := [*map(lambda z: z.lower(),filter(lambda y: y.isalpha(),[*s]))]) == x[::-1]- temp = ''.join(x for x in s if x.isalpha()).lower()
- return temp[::-1] == temp