def flatten_list(lst):
    """Function flattening list of lists.
       Arguments:
       lst       - list (of lists).

       Returns:
       flattened - flattened list."""

    flattened = []
    for l in lst:
        if isinstance(l, list):
            flattened += flatten_list(l)
        else:
            flattened.append(l)

    return flattened