deffunction(x):returnx[::-1]foriinrange(2):pal=input("Input a word to be tested.")invpal=function(pal)print("You inputed "+pal+" and the inverse is "+invpal)ifpal==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!