例子
import asyncio
async def main():
print("hello")
await asyncio.sleep(1)
print("world")
asyncio.run(main())
主要函数
task = asyncio.create_tas()
res = await asyncio.gather(task1, task2) # res: list
获取返回值
res = await task
标签:python,res,await,print,main,asyncio From: https://www.cnblogs.com/bitterteaer/p/17379216.html