Search
 
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
Name
3+2 =