- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
import asyncio
async def hello():
return "hello"
async def world():
return "world"
async def comma():
return ","
async def space():
return " "
async def excl():
return "!"
async def capitalize(coro):
return (await coro).capitalize()
async def main():
print(''.join(await asyncio.gather(*[asyncio.create_task(task) for task in (capitalize(hello()), comma(), space(), capitalize(world()), excl())])))
asyncio.run(main())