[15, 99, 4, 30, 3, 82, 7, 42]
def main(): ans = isPalindrome("badjab") print ans def isPalindrome(s): if len(s) <= 1: result = True elif s[0] != s[len(s)-1]: result = False else: result = isPalindrome(s[1:len(s)-1]) # draw stack diagram here return result main()