How can I convert a nested list to a specific dictionary format in Python

join shbcf.ru