asyncdefmain(): start = time.time() await asyncio.wait([hello_world(i) for i inrange(8)]) end = time.time() print("Complete in {} seconds".format(end - start))
hello world 1533904346.37133 hello world 1533904346.371683 hello world 1533904346.37199 hello world 1533904346.372059 hello world 1533904346.372122 hello world 1533904346.372176 hello world 1533904346.372245 hello world 1533904346.372295 num0 num3 num4 num1 num5 num6 num7 num2 Complete in 4.015289068222046 seconds [Finished in 4.2s]