title: Creating a palindrome checker with Python's loop and if statements
body: <p>I am trying to follow the instructions to create a palindrome. I am given half a function, and I have to fill in the blanks. I am currently unable to get the loop to work correctly. I am also unsure how to add characters to the beginning or the end of string without using the + or a comma. I do not think that is what I am being asked to do. 
  Here are the instructions;</p>
  
  <blockquote>
    <p>The is_palindrome function checks if a string is a palindrome... Fill in the blanks in this function to return True if the passed string is a palindrome, False if not.</p>
  </blockquote>
  
  <pre><code>def is_palindrome(input_string):
      # We'll create two strings, to compare them
      new_string = input_string.replace(" ", "")
      reverse_string = input_string.replace(" ", "")
      # Traverse through each letter of the input string
      for word in input_string: # Originally, I was only given the a FOR statement here, I wrote in the rest
          new_string+=word.replace(" ","").upper()
          # Add any non-blank letters to the 
          # end of one string, and to the front
          # of the other string. 
  
      if ___:
          new_string = ___
          reverse_string = ___
      # # Compare the strings
        if ___:
            return True
            return False
  
  print(is_palindrome("Never Odd or Even")) # Should be True
  print(is_palindrome("abc")) # Should be False
  print(is_palindrome("kayak")) # Should be True
  </code></pre>
  
  <p>I have removed the empty spaces and made everything the same case. I have assigned the characters to new_string, but it looks like I am supposed to use join to add the characters, but when I do the print statement does not print anything. I am unsure how to add the items in reverse order. 
  I am not even sure if I am on the correct track, because I am unsure what the IF statement is asking. I would think I should be able to use a loop to create the string and then compare the two strings.</p>
  
  <p>Also, could someone please explain why new_string.join(word) does not print anything out? How am I using it incorrectly? </p>
  
  <p>Thank you very much for any possible assistance.</p>