def split_and_strip(sep, s):
    """
    Split input `s` by separator `sep`, strip each output segment with empty
    segment dropped.
    """
    return [y for y in (x.strip() for x in s.split(sep)) if len(y) > 0]