def iter_wrapper(iterator): for i in iterator: yield i def iter_wrapper(iterator): yield from iterator