def fn2(x): yield x def fn(y): yield y yield from fn2(2) for value in fn(1): print(value)