Vidyalelo
Python · Q15

MCQs for Python Dictionaries: Exam

Programming · Python · question 15

Q15

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

A.
Creates a new dictionary with specified keys and a default value
Answer
B.
Adds new keys to the dictionary
C.
Copies keys and values from another dictionary
D.
Removes specified keys from the dictionary

Answer: Option A

Solution

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