await — Advanced Playground
Pauses execution of an async coroutine until a result is available
Python Playground
Output
Click "Run" to execute your codeAny object with __await__ can be used with 'await'. __await__ must return an iterator. Coroutines, Tasks, and Futures all implement this protocol.
Challenge
Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?