Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Merging Dictionaries with Unpacking | Packing and Unpacking in Python
Functional Programming Concepts in Python
Sectie 1. Hoofdstuk 5
single

single

Challenge: Merging Dictionaries with Unpacking

Veeg om het menu te tonen

Taak

Veeg om te beginnen met coderen

Write a function that accepts two dictionaries and returns a new dictionary with all key-value pairs merged using unpacking.

  • The function must return a new dictionary containing all key-value pairs from both input dictionaries.
  • If a key appears in both dictionaries, the value from the second dictionary must overwrite the value from the first dictionary.
  • The function must use dictionary unpacking to perform the merge.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 5
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

some-alt