@consumer
def coroutine():
    score = 0
yield
for _ in range(3):
    score = yield score + 1
yield
cs = coroutine()
for c in cs:
    print(c)
cs.send(c + 1)
Send values to Python coroutine without handling StopIteration