To Check whether a string is a Palindrome or not using python program August 17, 2018 Palindrome wrd=input("Please enter a word : ") wrd=str(wrd) rvs=wrd[::-1] print(rvs) if wrd == rvs: print("This word is a palindrome") else: print("This word is not a palindrome") Output: Please enter a word : hannah hannah This word is a palindrome Share Get link Facebook X Pinterest Email Other Apps Labels Python Programming Share Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment