https://leetcode-cn.com/problems/valid-palindrome/comments/
class Solution:
def isPalindrome(self, s):
"""
:type s: str
:rtype: bool
"""
#将s过滤,只保留数字和字母,再转为小写
s = ''.join(filter(str.isalnum, s)).lower()
#检查对称
return s == s[::-1]