Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (11 sloc) 287 Bytes
def palindrome(word):
revword = word[::-1]
if (word.lower() == revword.lower()):
return True
return False
word = input('Enter word/number: ')
check = palindrome(word)
if (check):
print(word+" is a palindrome")
else:
print(word+" is a not palindrome")
You can’t perform that action at this time.