Is there something similar to list comprehension in dict?

Terry Reedy tjreedy at udel.edu
Fri Nov 20 04:32:03 EST 2009


Peng Yu wrote:
> I'm wondering if there is something similar to list comprehension for
> dict (please see the example code below).

Python 3 has list, set, and dict comprehensions.
Don't know about 2.6/7




More information about the Python-list mailing list