Computer Science, asked by diljotsinghdhillon, 9 months ago

write a Python program to read and string and check if it is a palindrome​

Answers

Answered by sushiladevi4418
2

Answer:

WAP to check palindrome.

Explanation:

## enter any string

mystr= str(input("enter the string"))

mystr= mystr.casefold()

## it reverse the given string by the user.

revstr= reversed(mystr)

## check that reverse string match with the input string

if list(mystr) == list(revstr):

   print("it is palindrome")

else:

   print("it is not palindrome")

Similar questions