<filename>Week 2/Week2/ex1.3.py
def isPalindrome(string):
    return string == string[::-1]
    # OR
    # left_pos = 0
    # right_pos = len(string) - 1
    # 
    # while right_pos >= left_pos:
    #     if(string[left_pos] != string[right_pos]):
    #         return False
    #     left_pos += 1
    #     right_pos -= 1
    # 
    # return True

print(isPalindrome("aza"))

<filename>Week 2/Week2/ex1.3.py
def isPalindrome(string):
    return string == string[::-1]
    # OR
    # left_pos = 0
    # right_pos = len(string) - 1
    # 
    # while right_pos >= left_pos:
    #     if(string[left_pos] != string[right_pos]):
    #         return False
    #     left_pos += 1
    #     right_pos -= 1
    # 
    # return True

print(isPalindrome("aza"))

# OR # left_pos = 0 # right_pos = len(string) - 1 # # while right_pos >= left_pos: #     if(string[left_pos] != string[right_pos]): #         return False #     left_pos += 1 #     right_pos -= 1 # # return True