📜  asyncio 运行 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:06.503000             🧑  作者: Mango

代码示例1
>>> import asyncio

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

>>> asyncio.run(main())
hello
world