def function(x):
   return x[::-1]
for i in range(2):
   pal = input("Input a word to be tested.")

   invpal = function(pal)
   print("You inputed " + pal + " and the inverse is "+ invpal)

   if pal == invpal:
      print(pal + " is a Palindrome!")
   else:
      print(pal + " is not a Palindrome.")
You inputed  and the inverse is 
 is a Palindrome!
You inputed  and the inverse is 
 is a Palindrome!