Last active
February 2, 2020 04:48
-
-
Save kunigami/602a3c1a1a436209961bfd4e7c473244 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python 3.7+ | |
import asyncio | |
async def sleep(id): | |
print("will sleep", id) | |
await asyncio.sleep(4) | |
print("slept", id) | |
async def main(): | |
await sleep(1) | |
await sleep(2) | |
asyncio.run(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment