Take the following example:
def test(): return "test" yield "yield" for x in test(): print(x) print(next(test()))