+1 vote
in Python by (305 points)  
>>> x = {'a':1, 'b': 2}
>>> y = {'b':10, 'c': 11}
>>> z = x.update(y)
>>> print(z)
>>> x
{'a': 1, 'b': 10, 'c': 11}
I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

4 questions

1 answer


2k users

Welcome to Tech Talk, where you can ask questions and receive answers from other members of the community.