urls = list of urls with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor: futures = [executor.submit(process_url, url) for url in urls] for future in concurrent.futures.as_completed(futures): result = future.result() print(result) if result == 403: # do something else without using ThreadPoolExecutor
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)