Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. word = input()
  2.  
  3. def isPalindrome(x):
  4. if len(x) > 1:
  5. if x[0] == x[-1] and isPalindrome(x[1:-1]):
  6. return('The word is Plaindrome.')
  7. else:
  8. return('It is not.')
  9. else:
  10. return(True) #As this is a base case.
  11.  
  12.  
  13. print(isPalindrome(word))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement