Function to check if string is Palindrome or Not
def isPalindrome ( string : list ) -> bool : NEW_LINE INDENT n = len ( string ) NEW_LINE for i in range ( n // 2 ) : NEW_LINE INDENT if string [ i ] != string [ n - 1 - i ] : NEW_LINE INDENT return False NEW_LINE DEDENT DEDENT return True NEW_LINE DEDENT