DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
Python Dictionary Comprehension
# Dictionary Comprehension
squares
=
{
x
:
x
*
x
for
x
in
range
(
6
)
}
print
(
squares
)
Source by www.python.org #
PREVIOUS
NEXT
Tagged:
#Python
#Dictionary
#Comprehension
ADD COMMENT
Topic
COMMENT
Name
9+2 =
Submit