DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
1+9 =
Submit