def flatten_list(lofl):
    """
    Flatten a list of lists.
    """
    new_list = []
    for item in lofl:
        if type(item) == list:
            rl = flatten_list(item)
            new_list.extend(rl)
        else:
            new_list.append(item)
    return new_list