Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

dict comprehensions

>>> print {i : chr(65+i) for i in range(4)}
{0 : 'A', 1 : 'B', 2 : 'C', 3 : 'D'}
Source by www.python.org #
 
PREVIOUS NEXT
Tagged: #dict #comprehensions
ADD COMMENT
Topic
Name
1+5 =