class Solution(object):
    def isPalindrome(self, s):
        """
        :type s: str
        :rtype: bool
        """
        s=[char for char in s.lower() if 'a'<=char<='z' or '0'<=char<='9']
        n=len(s)
        if n<=1:
            return True
        for i in range(n):
            if s[i]==s[n-1-i]:
                continue
            else:
                return False
        return True

s = Solution()
str="0P"
print(s.isPalindrome(str))
