DEV Community

sankar
sankar

Posted on

program to take string and return true if it is a palindrome,false otherwise

'''
program to take string and return true if it is a palindrome,false otherwise
'''
string ="rotator"
result=string[::-1]
if result == string:
print("true")
else:
print("false")

output:

true

Top comments (0)