Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python concatenate dictionaries

# list_of_dictionaries contains a generic number of dictionaries
# having the same type of keys (str, int etc.) and type of values
global_dict = {}

for single_dict in list_of_dictionaries:
    global_dict.update(single_dict)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #concatenate #dictionaries
ADD COMMENT
Topic
Name
4+7 =