>>> new_list = [1, 2, 3, 4, 5, 6]
>>> new_list == sorted(new_list)
True
>>> new_list = [1, 2, 3, 4, 8, 6, 5]
>>> new_list == sorted(new_list)
False
И правильно ли я вообще делаю?
from concurrent.futures import ThreadPoolExecutor
from requests import Session
session = Session()
urls = [
'https://toster.ru/q/372757',
'https://toster.ru/',
]
with ThreadPoolExecutor(7) as pool: # 7 - количество тредов
for response in pool.map(session.get, urls):
do_something_with_response(response)
from collections import OrderedDict