Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created June 14, 2020 04:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IndhumathyChelliah/f01bce8158cbdee90d8a43e7a4eeab54 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/f01bce8158cbdee90d8a43e7a4eeab54 to your computer and use it in GitHub Desktop.
#update() - combining - merging both dictionaries and updating first - dictionary
first={'name':'karthi',
'age':7,
'city':'chennai',
}
second={'name':'sarvesh',
'age':3}
#update () function won't return any value.
print(first.update(second))
#Output: None
print(first)
#Output:{'name': 'sarvesh', 'age': 3, 'city': 'chennai'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment