Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

set empty dictionary key python

#Create a dictionary with a set of keys without any values
key_list = [1,2,3,4,5]
w_dict = dict(zip(key_list, [None]*len(key_list)))
print(w_dict)
Source by pythonguides.com #
 
PREVIOUS NEXT
Tagged: #set #empty #dictionary #key #python
ADD COMMENT
Topic
Name
6+8 =