Python Coroutine


```typeimport aiohttpimport asyncioimport timeit@asyncio.coroutinedef fetch(url):    print('Start', url)    req = yield from aiohttp.request('GET', url)    print('Done', url)@asyncio.coroutinedef fetch_all(urls):    fetches = [asyncio.Task(fetch(url)) for url in urls]    yield from asyncio.gather(*fetches)```


### after python 3.7
```typeimport aiohttpimport asyncioimport timeitasync def fetch(url):    print('Start', url)    req = yield from aiohttp.request('GET', url)    print('Done', url)async def fetch_all(urls):    fetches = [asyncio.Task(fetch(url)) for url in urls]    yield from asyncio.gather(*fetches)```



> [Python 3, asyncio와 놀아보기](https://tech.ssut.me/python-3-play-with-asyncio/)





