import asyncio async def countdown(): for i in range(5): print(f"Countdown: {5-i}") await asyncio.sleep(1) async def do_some_work(name, delay): print(f"{name} is starting work") await asyncio.sleep(delay) print(f"{name} is done with work") async def do_a_lot_of_work(): await asyncio.gather(do_some_work("A", 1), do_some_work("B", 2), do_some_work("C", 3)) #asyncio.run(do_a_lot_of_work()) asyncio.run(countdown())