Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python create a dictionary of integers

>>> dict.fromkeys(range(1, 4))
{1: None, 2: None, 3: None}
>>> dict(zip(range(1, 4), range(1, 4)))
{1: 1, 2: 2, 3: 3}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #create #dictionary #integers
ADD COMMENT
Topic
Name
3+8 =