Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import location
- import os
- # function which return reverse of a string
- def reverse(s):
- return s[::-1]
- def isPalindrome(theString):
- flip = reverse(theString)
- if flip == theString:
- print("True")
- else:
- print("False")
- isPalindrome("nitin")
Add Comment
Please, Sign In to add comment