Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • I suspect performance will not be very good though; creating a set out of each dict then only iterating through the keys means another lookup for the value each time (though relatively fast, still increases the order of the function for scaling)
    – Breezer
    Commented Feb 16, 2017 at 14:57
  • 3
    it all depends on the version of the python we are using. In 3.5 and above {**x,**y} gives the concatenated dictionary
    – Rashid Mv
    Commented Dec 23, 2017 at 15:50