Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

turn dictionary into flat list

>>> [item for k in d for item in (k, d[k])]
['a', 1, 'c', 3, 'b', 2]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #turn #dictionary #flat #list
ADD COMMENT
Topic
Name
1+6 =