Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python dict comprehension

>>> {x: x**2 for x in (2, 4, 6)}
{2: 4, 4: 16, 6: 36}
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #python #dict #comprehension
ADD COMMENT
Topic
Name
8+2 =