def flatten(items):
    """Convert a sequence of sequences to a single flat sequence.

    Works on dictionaries, tuples, lists.
    """
    result = []
    for item in items:
        if isinstance(item, list):
            result += flatten(item)
        else:
            result.append(item)
    return result