import re
'''
Valid Palindrome
https://leetcode.com/problems/valid-palindrome/
'''
def isPalindrome(self, s):
    """
    :type s: str
    :rtype: bool
    """
    s = re.sub("\W", "", s).lower()
    return s == s[::-1]

238b68ec96c8aa2e09f5df0a6a602aac62de23c6
<mask token>

<mask token>


def isPalindrome(self, s):
    """
    :type s: str
    :rtype: bool
    """
    s = re.sub('\\W', '', s).lower()
    return s == s[::-1]

import re
<mask token>


def isPalindrome(self, s):
    """
    :type s: str
    :rtype: bool
    """
    s = re.sub('\\W', '', s).lower()
    return s == s[::-1]

import re
'''
Valid Palindrome
https://leetcode.com/problems/valid-palindrome/
'''
def isPalindrome(self, s):
    """
    :type s: str
    :rtype: bool
    """
    s = re.sub("\W", "", s).lower()
    return s == s[::-1]
