'''
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.

For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" is not a palindrome.
'''

class Solution(object):
    def isPalindrome(self, s):
        """
        :type s: str
        :rtype: bool
        """
        lst = [c for c in s.lower() if c.isalnum()]
        return lst == lst[::-1]
        
        

f2d03a02a7e8c0beeb5ebdf2448a95c6d3cbc18a
<mask token>

<mask token>


class Solution(object):
    <mask token>

<mask token>


class Solution(object):

    def isPalindrome(self, s):
        """
        :type s: str
        :rtype: bool
        """
        lst = [c for c in s.lower() if c.isalnum()]
        return lst == lst[::-1]

'''
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.

For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" is not a palindrome.
'''

class Solution(object):
    def isPalindrome(self, s):
        """
        :type s: str
        :rtype: bool
        """
        lst = [c for c in s.lower() if c.isalnum()]
        return lst == lst[::-1]
        
        
