Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

deine dict with same values

>>> v = 12
>>> d = {k:v for k in 'abfhp'}
>>> print d
{'a': 12, 'h': 12, 'b': 12, 'p': 12, 'f': 12}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #deine #dict #values
ADD COMMENT
Topic
Name
9+8 =