To find palindrome using function

def palindrome(string_name):

reverse_string=string_name[::-1]
if string_name==reverse_string:
    print("Given string is palindrome.")
else:
    print("Given string is not a palindrome.")
return " "

string_name=input(“Enter the word:”)
print(palindrome(string_name))

@brindhubala30

Correct. Keep it up.
Keep Practicing

1 Like

thank you very much mam. :blush:

1 Like