Python Programming - Dictionaries - Discussion

Discussion Forum : Dictionaries - General Questions (Q.No. 31)
31.
What is the purpose of the dictionary.popitem() method?
Removes the last key-value pair from the dictionary.
Removes a random key-value pair from the dictionary.
Raises a KeyError.
Adds a new key-value pair to the dictionary.
Answer: Option
Explanation:
The popitem() method removes a random key-value pair from the dictionary.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.