from typing import List


def split_list(a:List, n:int) -> List[List]:
    """
    Split the list a into n approximately equally long lists

    :param a: a list to split
    :param n: number of parts the list shall be split into
    :return: a list of lists
    """
    assert n>0

    k, m = divmod(len(a), n)
    return [a[i * k + min(i, m):(i + 1) * k + min(i + 1, m)] for i in range(n)]