Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create list of dictionaries from list of list python

list_of_dict = []
for row in list_of_list[1:]:	# Taking 0 index as header or key and rest as value
    list_of_dict.append({key: val for key, val in list(zip(*[list_of_list[0], row]))})
 
PREVIOUS NEXT
Tagged: #create #list #dictionaries #list #list #python
ADD COMMENT
Topic
Name
4+8 =