Python Programming - Dictionaries - Discussion

Discussion Forum : Dictionaries - General Questions (Q.No. 41)
41.
What is the purpose of the dictionary.update(key=value) method?
Adds a new key-value pair to the dictionary.
Updates the values of the dictionary with new values.
Removes a key-value pair from the dictionary.
Raises a SyntaxError.
Answer: Option
Explanation:
The update() method with key=value adds a new key-value pair to the dictionary.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.