Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created Jun 14, 2020
Embed
What would you like to do?
#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