Skip to content

Instantly share code, notes, and snippets.

@Winston1029
Created August 2, 2013 15:26
Show Gist options
  • Select an option

  • Save Winston1029/6140761 to your computer and use it in GitHub Desktop.

Select an option

Save Winston1029/6140761 to your computer and use it in GitHub Desktop.
final_dict = dict(dict1.items() + dict2.items())
# OR memory saving method
final_dict = dict( chain(dict1.items(), dict2.items()) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment