Jump to content

Associative array/Merging: Difference between revisions

m
(added Python solution)
Line 56:
<pre>{"color": "red", "name": "Rocket Skates", "price": 15.25, "year": 1974}</pre>
 
=={{header|Python}}==
As of Python 3.5, this can be solved with the dictionary unpacking operator.
<lang Python>base = {"name":"Rocket Skates", "price":12.75, "color":"yellow"}
222

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.