5
User
Recs.
Recs.
4
Updates
Last
Updated
Updated
Activity
Dictionaries can be created using a syntax similar to that of list comprehensions:
>>> {i : chr(65+i) for i in range(4)}
{0 : 'A', 1 : 'B', 2 : 'C', 3 : 'D'}
Specs
Pros
Know any positive aspects of this option?
Cons
Know any negative aspects of this option?
Recommendations
Dictionary Comprehensions
Recommended 8 years ago
Michael hasn’t added their experience, pros or cons to their recommendation.
Dictionary Comprehensions
Recommended 11 years ago
Jeff hasn’t added their experience, pros or cons to their recommendation.
Dictionary Comprehensions
Recommended 11 years ago
Sathvik hasn’t added their experience, pros or cons to their recommendation.
Dictionary Comprehensions
Recommended 11 years ago
T-R hasn’t added their experience, pros or cons to their recommendation.
Dictionary Comprehensions
Recommended 11 years ago
wodow hasn’t added their experience, pros or cons to their recommendation.