Last active
May 8, 2021 09:58
-
-
Save computer-tutor/23f881727829023ca86ed75a3895d0e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add_dict(dict1, dict2): | |
return dict(list(dict1.items()) + list(dict2.items())) | |
dic1 = {'a':1, 'b':2, 'c':3} | |
dic2 = {'c':4, 'd':5, 'e':6} | |
print(add_dict(dic1, dic2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment