class Solution:
"""
@param: s: A string
@return: Whether the string is a valid palindrome
"""
def isPalindrome(self, s):
from string
import punctuation
if not s:
return True
s = s.translate(
None, punctuation)
s = s.replace(
' ',
'')
s = s.lower()
lens = len(s)
for i
in range(lens/
2):
if s[i] != s[lens - i -
1]:
return False
return True