import itertools


def split_lst(lst, delimiter, keep_delimiter=True):
    """
    Split list into sublists based on a delimiter
    """
    if keep_delimiter:
        append = [delimiter]
    else:
        append = []
    sublists = [list(y) + append
                for x, y 
                in itertools.groupby(lst, lambda z: z == delimiter) 
                if not x]
    return sublists