Last active
May 8, 2021 08:27
-
-
Save mr-yoo/2d0559c818623ce452adc6c2b7d0860e to your computer and use it in GitHub Desktop.
asyncio#0 - https://cafe.naver.com/pystock/6778
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
import asyncio | |
async def A(): | |
num1 = 3 | |
num2 = await B() | |
if num1 < num2: | |
print("OK") | |
async def B(): | |
num2 = 5 | |
return num2 | |
async def main(): | |
a = A() | |
await asyncio.gather(a) | |
asyncio.run(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment