OnlinePython

Adding Dictionary Items Exercise

Question 1 of 5

You're building a user profile system. You have an existing profile and want to add new information without overwriting existing data:

profile = {'name': 'Alice', 'email': 'alice@example.com'}
new_info = {'email': 'newalice@example.com', 'phone': '555-1234', 'city': 'Boston'}

Which approach safely adds only new keys?