PYTHON CODING
- waclaw_koscielniak
- Sep 16
- 1 min read
import asyncio
async def double(x):
await asyncio.sleep(0.05)
return x * 2
async def main():
results = await asyncio.gather(double(3), double(4), double(5))
print(max(results), sum(results))
asyncio.run(main())
[Running] python3 -u "/Users/name/test/test194.py"
10 24
[Done] exited with code=0 in 0.17 seconds

Try to run it.