Skip to content

Instantly share code, notes, and snippets.

@mr-yoo
Last active May 8, 2021 08:27
Show Gist options
  • Save mr-yoo/2d0559c818623ce452adc6c2b7d0860e to your computer and use it in GitHub Desktop.
Save mr-yoo/2d0559c818623ce452adc6c2b7d0860e to your computer and use it in GitHub Desktop.
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