def squeeze_list(listA, val=-1):
    """ Compact a list of lists into a single list.

    Squeezes (spaghettify) a list of lists into a single list.
    The lists are concatenated into a single one, and to separate
    them it is used a separating value to mark the split location
    when unsqueezing the list.

    Parameters
    ----------
    listA : list
        List of lists.
    val : number, optional
        Value to separate the lists.

    Returns
    -------
    list
        A list with all lists concatenated into one.

    Examples
    --------
    Compact a list of lists into a single list.

    >>> from dbcollection.utils.pad import squeeze_list
    >>> squeeze_list([[1,2], [3], [4,5,6]], -1)
    [1, 2, -1, 3, -1, 4, 5, 6]

    """
    concatA = [l + [val] for l in listA]
    out = [li for l in concatA for li in l]
    return out[:-1]