Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPythonasyncio event loop internalsSingle-choice MCQ

When you call `asyncio.create_task(coro())`, when does the coroutine's body first start executing relative to the line after the call?

log = [] async def coro(): log.append("body") t = asyncio.create_task(coro()) log.append("after create_task") await asyncio.sleep(0) # log == ?