# your code goes here
# your code goes here
def isPalindrome(s: str) -> bool:
temp = ""
for i in s.lower():
if "a" <= i <= "z" or "0" <= i <= "9" :
temp = temp + i
l,r = 0 , len(temp) -1
while l<r:
print(l,r,temp[l],temp[r])
print(l,r,temp[l]!=temp[r])
if temp[l] != temp[r]:
return "false"
r = r-1
l = l+1
return "true"
print(isPalindrome("race a car"))
IyB5b3VyIGNvZGUgZ29lcyBoZXJlCiMgeW91ciBjb2RlIGdvZXMgaGVyZSAgICAKZGVmIGlzUGFsaW5kcm9tZShzOiBzdHIpIC0+IGJvb2w6CiAgICB0ZW1wID0gIiIKICAgIGZvciBpIGluIHMubG93ZXIoKToKICAgICAgICBpZiAiYSIgPD0gaSA8PSAieiIgb3IgIjAiIDw9IGkgPD0gIjkiIDoKICAgICAgICAgICAgdGVtcCA9IHRlbXAgKyBpCiAgICBsLHIgPSAwICwgbGVuKHRlbXApIC0xCiAgICB3aGlsZSBsPHI6CiAgICAgICAgcHJpbnQobCxyLHRlbXBbbF0sdGVtcFtyXSkKICAgICAgICBwcmludChsLHIsdGVtcFtsXSE9dGVtcFtyXSkKICAgICAgICBpZiB0ZW1wW2xdICE9IHRlbXBbcl06CiAgICAgICAgICAgIHJldHVybiAiZmFsc2UiCiAgICAgICAgciA9IHItMQogICAgICAgIGwgPSBsKzEKICAgIHJldHVybiAidHJ1ZSIgCgpwcmludChpc1BhbGluZHJvbWUoInJhY2UgYSBjYXIiKSk=