# Yielding from stopped generator is ok and results in Nonedefgen():return1# This yield is just to make this a generatoryieldf=gen()defrun():print((yield fromf))print((yield fromf))print((yield fromf))try:next(run())exceptStopIteration:print("StopIteration")