understand how s and s11 shorten one character and then grow one character at a time because there is no loop.

def toChars(s):
    import string
    #s = string.lower(s)
    s = s.lower()
    ans = ''
    for c in s:
        #if c in string.lowercase:
        if c in s:
            ans = ans + c
    return ans

def isPal(s):
    if len(s) <= 1:
        return True
        equation=(s[0] == s[-1])
        returnboth=returnequation and returnispal
        return returnboth

def isPalindrome(s):
    """Returns True if s is a palindrome and False otherwise"""
    return returnispal

print (isPalindrome('Guttag'))
print (isPalindrome('Guttug'))
print (isPalindrome('Able was I ere I saw Elba'))
print (isPalindrome('Are we not drawn onward, we few, drawn onward to new era?'))

Open in new window

I created variables so I can see changes in a debugger ide

in def is Palindrome(s)
I do not understand how s and s11 shorten one character and then grow one character at a time because there is no loop.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

the ispal function is being called recursively.
rgb192Author Commented:
or both

and how
isPalindrome is the initial invocation of the isPal function.  The recursion only happens once you are inside the isPal function.  So, I think the answer to your question is 19.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rgb192Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.