Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

transformer un dictionnaire en liste python

# A list of the keys of dictionary
list_keys = [ k for k in dict ]
 
# or a list of the values
list_values = [ v for v in dict.values() ]
 
# or just a list of the list of key value pairs
list_key_value = [ [k,v] for k, v in dict.items() ]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #transformer #dictionnaire #en #liste #python
ADD COMMENT
Topic
Name
3+2 =