Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

merge two dictionaries

# merge two dictionaries
x = {'a': 1,'b':2}
y = {'d':3,'c':5}
z = {**x, **y}
print(z)					# {'a': 1, 'b': 2, 'd': 3, 'c': 5}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #merge #dictionaries
ADD COMMENT
Topic
Name
1+7 =