basic asyncio syntax

Solutions on MaxInterview for basic asyncio syntax by the best coders in the world

showing results for - "basic asyncio syntax"
Tim
28 Jun 2018
1>>> import asyncio
2
3>>> async def main():
4...     print('hello')
5...     await asyncio.sleep(1)
6...     print('world')
7
8>>> asyncio.run(main())
9hello
10world
11