All challenges
Code AnalysisIntermediate 45s

asyncio timeout

What is the output?
Starter code
import asyncio
async def slow():
    await asyncio.sleep(1)
    return 'slow'
async def main():
    try:
        async with asyncio.timeout(0.01):
            await slow()
    except TimeoutError:
        print('timeout')
asyncio.run(main())

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle