Skip to content

Instantly share code, notes, and snippets.

@includeamin
Created June 18, 2019 11:21
Show Gist options
  • Save includeamin/8f7871744856b89c9b1e5b596cf5e41c to your computer and use it in GitHub Desktop.
Save includeamin/8f7871744856b89c9b1e5b596cf5e41c to your computer and use it in GitHub Desktop.
sum of two same dictionary
one = {"XP": 5, "Gold": 5, "Rank": 2, "Diamond":5}
two = {"XP": 5, "Gold": 5, "Rank": 2, "Diamond":5}
sum_temp = {key:one[key]+two[key] for key in one.keys()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment