Creates palindrome numbers with first half as i . Value of j decides whether we need an odd length or even length palindrome .
i = 1 NEW_LINE number = createPalindrome ( i , j ) NEW_LINE while number <= N : NEW_LINE INDENT palindromes . append ( number ) NEW_LINE i += 1 NEW_LINE number = createPalindrome ( i , j ) NEW_LINE DEDENT return palindromes NEW_LINE