Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- word = input()
- def isPalindrome(x):
- if len(x) > 1:
- if x[0] == x[-1] and isPalindrome(x[1:-1]):
- return('The word is Plaindrome.')
- else:
- return('It is not.')
- else:
- return(True) #As this is a base case.
- print(isPalindrome(word))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement