import itertools


def flatten(lst):
    """ Flatten a list object until it do not have any depth.
    If the object passed as a parameter is not a list, it will be converted as
    such.
    :param lst: The list to flatten.

    Examples:
    >>> flatten([4, 8, 15, 16, 23, 42])
    [4, 8, 15, 16, 23, 42]
    >>> flatten([[4, 8, 15, 16, 23, 42]])
    [4, 8, 15, 16, 23, 42]
    >>> flatten([[[4, 8, 15, 16, 23, 42]]])
    [4, 8, 15, 16, 23, 42]
    """
    while True:
        try:
            lst = list(itertools.chain(*lst))
            if type(lst[0]) != list:
                return lst
        except TypeError:
            return list(lst)
        except IndexError:
            return lst