human
Complete this python program:
def _flatten(iterable):
assistant
#Here is the Python program you requested.

    """Flatten nested iterable of (tuple, list).
    """
    def rec(iterable):
        for i in iterable:
            if isinstance(i, (tuple, list)):
                for j in rec(i):
                    (yield j)
            else:
                (yield i)
    return rec(iterable)