def flatten(items):
    """Removes one level of nesting from items

    Parameters
    ----------
    items : iterable
        list of items to flatten one level

    Returns
    -------
    flattened_items : list
        list of flattened items, items can be any sequence, but flatten always
        returns a list.

    Examples
    --------
    >>> from skbio.util import flatten
    >>> h = [['a', 'b', 'c', 'd'], [1, 2, 3, 4, 5], ['x', 'y'], ['foo']]
    >>> print(flatten(h))
    ['a', 'b', 'c', 'd', 1, 2, 3, 4, 5, 'x', 'y', 'foo']

    """
    result = []
    for i in items:
        try:
            result.extend(i)
        except TypeError:
            result.append(i)
    return result