Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to convert multi list into dict in python

from collections import OrderedDict

o = collections.OrderedDict()
for i in data:
     o.setdefault(i[0], []).append(i[1])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #multi #list #dict #python
ADD COMMENT
Topic
Name
6+4 =