Skip to content

Instantly share code, notes, and snippets.

@nmchenry01
Last active November 23, 2021 20:09
Show Gist options
  • Select an option

  • Save nmchenry01/a5b61b0f386ff6031b6b3f51257158ce to your computer and use it in GitHub Desktop.

Select an option

Save nmchenry01/a5b61b0f386ff6031b6b3f51257158ce to your computer and use it in GitHub Desktop.
A second example of creating and printing a coroutine
import asyncio
async def something_async():
# Wait 3 seconds
await asyncio.sleep(3)
return "I'm async (sortof) now!"
def main():
result = something_async()
print(result)
main()
# Output:
#
# <coroutine object something_async at 0x7f775c1d51c0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment