Vidyalelo
Python · Q66

MCQs for Python Dictionaries: Exam

Programming · Python · question 66

Q66

If a is a dictionary with some key-value pairs, what does a.popitem() do?

A.
Removes an arbitrary element
Answer
B.
Removes all the key-value pairs
C.
Removes the key-value pair for the key given as an argument
D.
Invalid method for dictionary

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board