I wrote two simple functions to determine if a string is a palindrome. I thought they were equivalent, but 2 doesn\'t work. Why is this?
1
str = input("Enter a string") print("\n".join(["Inserted string is" + "NOT"*((str[::-1])!=str)+ " a palindrome"]))