+ 1

Issues writing a program to detect whether a string is a palindrome or not

I have this code, but for some reason it keeps coming up as an error: string=input("Enter string:") if(string==string[::-1]): print("The string is a palindrome") else: print("The string isn't a palindrome")

8th Nov 2017, 1:35 AM
Ceolan McMullin
Ceolan McMullin - avatar
4 Respuestas
0
It needs to be in Python
8th Nov 2017, 1:47 AM
Ceolan McMullin
Ceolan McMullin - avatar
8th Nov 2017, 1:54 AM
Ade Kurniawan
Ade Kurniawan - avatar
0
Btw, can you post your code here? I want to try your code but I cannot copy it.
8th Nov 2017, 1:56 AM
Ade Kurniawan
Ade Kurniawan - avatar