import copy


def sort_series(serlist):
    """
    Sort a list of series names alphabetically, except for 'k' and 't' (at the front).

    Works on a copy, and returns it. (Not an in-place sort.)

    This should be moved to sfc_models, since the same code appears there.

    :param serlist: list
    :return:
    """
    new_serlist = copy.copy(serlist)
    new_serlist.sort()
    if 't' in new_serlist:
        new_serlist.remove('t')
        new_serlist.insert(0, 't')
    if 'k' in new_serlist:
        new_serlist.remove('k')
        new_serlist.insert(0,'k')
    return new_serlist