Answer the question
In order to leave comments, you need to log in
How to create a list of dictionaries from a given list?
There is a list:
['Русский', 'Родной', 'Английский', 'C1 — Продвинутый', 'Французский', 'A2 — Элементарный']
[{'Русский': 'Родной'}, {'Английский': 'C1 — Продвинутый'}, {'Французский': 'A2 — Элементарный'}]
lang_proficiency = []
for i in range(1, len(t)):
item = {}
item[t[i-1]] = t[i]
lang_proficiency.append(item)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question