What does this do? def func(): print 'foo' return yield 'bar' print func() Take a guess, then give it a try.