"""
Recursive function to remove spaces

This function should be copied into the Python Tutor.  That way you can
see how recursion affects the call stack.

Author: Walker M. White, Lillian Lee, Anne Bracy, Daisy Fan
"""

# Function Definition
def deblank(s):
    """
    Returns: s without spaces (all other blanks left alone)

    Parameter s: The string to remove blanks
    Precondition: s is a string.
    """
    if s == '':
        return s
    elif len(s)==1:
        return '' if s[0]==' ' else s

    left= deblank(s[0])
    right= deblank(s[1:])

    return left+right

# Function Call
x = deblank(' a b c')
