Vidyalelo
Python · Q14

MCQs for Python Dictionaries: Exam

Programming · Python · question 14

Q14

What is the purpose of the clear() method for dictionaries?

A.
Removes all key-value pairs from the dictionary
Answer
B.
Adds a key-value pair to the dictionary
C.
Removes the last key-value pair
D.
Deletes the dictionary

Answer: Option A

Solution

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