Did I miss something ?
async def foo():
print('Hi!')
await bar()
print('Whassup?')
await bar()
print('fine too')
async def bar():
print('Hello!')
await asyncio.sleep(1)
print('Fine, and you?')
await asyncio.sleep(1)
print('Ok, Great!')
await asyncio.sleep(1)
asyncio.run(foo())
Desired output:
Hi!
Hello!
Whassup?
Fine, and you?
fine too
Ok, Great!
Current output:
Hi!
Hello!
Fine, and you?
Ok, Great!
Whassup?
Hello!
Fine, and you?
Ok, Great!
fine too