def multiplethread(data): q = Queue() start = time.time() print(f"current start time: {start}") threads =[] for i in range(len(data)): t = threading.Thread(target = job, args=(data[i], q)) t.start() threads.append(t) for thread in threads: thread.join() result = [] for i in range(len(data)): result.append(q.get()) print(result) end = time.time() print(f"current end time: {end}, time useage: {end - start}") def singlethread(data): q = Queue() start = time.time() print(f"current start time: {start}") threads =[] for i in range(len(data)): job(data[i], q) result = [] for i in range(len(data)): result.append(q.get()) print(result) end = time.time() print(f"current end time: {end}, time useage: {end - start}")