fromkeys method creates a new dictionary with the given keys, each with a default corresponding value of None : Fromkeys : Dictionary PYTHON TUTORIALS


PYTHON TUTORIALS » Dictionary » Fromkeys »

 

fromkeys method creates a new dictionary with the given keys, each with a default corresponding value of None


print {}.fromkeys(['name', 'age'])



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Dictionary
» Fromkeys