Python Programming - Dictionaries - Discussion

Discussion Forum : Dictionaries - General Questions (Q.No. 33)
33.
How do you create a dictionary with default values for keys?
default_dict = dict.default(value)
default_dict = dict.fromkeys(keys, value)
default_dict = dict.create(keys, value)
default_dict = dict(keys, value)
Answer: Option
Explanation:
The fromkeys() method is used to create a dictionary with default values for specified keys.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.