Answers for "asyncio run"

0

asyncio run

>>> import asyncio

>>> async def main():
...     print('hello')
...     await asyncio.sleep(1)
...     print('world')

>>> asyncio.run(main())
hello
world
Posted by: Guest on February-23-2021

Python Answers by Framework

Browse Popular Code Answers by Language