Skip to content
CodeKruPro

Calling an async function without await

QuizMediumPython only

An async def function is a coroutine function: calling it does not run it, you await it. Given async def fetch(): return 1, which statements are true? Pick all that apply.

  • fetch() without await returns a coroutine object, not 1
  • If the coroutine is never awaited, Python warns "coroutine 'fetch' was never awaited"
  • asyncio.run(fetch()) runs it from normal code and returns 1
  • async functions run on several cores in parallel

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in