import itertools


def flatten_list(_list: list):
    """Flattens a nested list properly.

    Parameters
    ----------
    _list : list
        Contains the list with nested lists within it.

    Returns
    -------
    flattened_list : list
        Returns the flattened list.
    """
    flatten_list = itertools.chain(*_list)

    return flatten_list