the async and await keywords the full listing for the program is given belowimport asyncio import time async def worker()print('worker will take some time'time sleep( print('worker done it'return async def do_something()print('do_something will wait for worker'result await worker(print('do_something result:'resultdef main()print('main starting'asyncio run(do_something()print('main done'if __name__ ='__main__'main(when this program is executed the output ismain starting do_something will wait for worker worker will take some time worker done it do_something result main done when this is run there is pause between the two worker printouts as it sleeps although it is not completely obvious herethe do_something(function was run as one taskthis task then waited when it got to the worker(function which was run as another task once the worker task completed the do_something task could continue and complete its operation once this happened the async io event loop could then terminate as no further tasks were available async io tasks tasks are used to execute functions marked with the async keyword concurrently tasks are never created directly instead they are created implicitly via the keyword await or through functions such as asyncio run described above or