def aggressive_strip(string):
    """
    Split a string along newlines, strip surrounding whitespace on
    each line, and recombine with a single space in place of the
    newlines.
    """
    return ' '.join(filter(None, map(str.strip, string.splitlines())))
