In this TIL article Daniel shares how he learned that if you're writing asynchronous code, you don't need to run an async loop inside the notebook. In fact, you can just paste the snippet below into a code cell and it will run directly:
import asyncio
async def f():
print("starting")
await asyncio.sleep(3)
print("done")
await f()
In a regular Python script, you can't write await f()
just like that, outside of an asynchronous function.