Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_palindrome(s):
- a = 0
- b = 1
- #base case
- if s == '':
- return True
- else:
- if s[0] == s[len(s)-1]:
- a = a + 1
- is_palindrome(s[a:(len(s)-a)])
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement