```
class Solution(object):
def isPalindrome(self, s):
"""
:type s: str
:rtype: bool
"""
l=[]
for i in s:
if('0'<=i<='9' or 'a'<=i<='z' or 'A'<=i<='Z'):
l.append(i.lower())
i = 0
j = len(l)-1
while(i<j):
if(l[i] != l[j]):
return False
else:
i+=1
j-=1
```

` return True`