Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import asyncio
- import time
- async def Krash_go():
- print("Крош начал движение")
- await asyncio.sleep(3)
- print('Крош прибыл к причалу')
- async def Chico_go():
- print("Ежик начал движение")
- await asyncio.sleep(3)
- print('Ежик прибыл к причалу')
- async def main():
- task1 = asyncio.create_task(Krash_go())
- task2 = asyncio.create_task(Chico_go())
- await task1
- await task2
- print(time.strftime('%X'))
- asyncio.run(main())
- print(time.strftime('%X'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement