Why partial score


class Solution:
# @param A : string
# @return an integer
def isPalindrome(self, A):
pun_a = Punctuation(A)
concat = “”.join(pun_a.split())
if Palindrome(concat.lower()):
return 1
return 0

def Palindrome(str):

# Run loop from 0 to len/2 
for i in range(0, int(len(str)/2)): 
    if str[i] != str[len(str)-i-1]:
        return False
return True

def Punctuation(string):

# punctuation marks 
punctuations = '''!()-[]{};:'"\,<>./?@#$%^&*_~'''

# traverse the given string and if any punctuation 
# marks occur replace it with null 
for x in string.lower(): 
    if x in punctuations: 
        string = string.replace(x, "") 
return string