import functools


def tolist_and_strip_outlist(func):
    """
    This decorator works for functions that return a pandas Series. It converts the series to
    a list and strips white space from the output.
    
    """
    @functools.wraps(func)
    def tolist_and_strip(*args,**kwargs):
        result = func(*args, **kwargs)
        return [r.strip() for r in result.tolist()]

    return tolist_and_strip