Python Programming - Dictionaries - Discussion

Discussion Forum : Dictionaries - General Questions (Q.No. 16)
16.
What does the dictionary.fromkeys(keys, default_value) method do?
Creates a new dictionary with specified keys and values.
Creates a new dictionary with specified keys and default values.
Updates an existing dictionary with new keys and values.
Removes specified keys from a dictionary.
Answer: Option
Explanation:
The fromkeys() method creates a new dictionary with specified keys and default values.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.