Sectie 1. Hoofdstuk 5
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
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 5
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.