<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"""
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 (wmw2)
Date:   October 10, 2017 (Python 3 Version)
"""

# 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
    
    if s[0] == ' ':
        return deblank(s[1:])
    
    return s[0]+deblank(s[1:])

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

</pre></body></html>