 |
Python: create a dictionary with list comprehension - Stack Overflow
I like the python list comprehension syntax. Can it be used to create dictionaries too? For example, by iterating over pairs of keys and values: mydict = {(k,v) for (k,v) in blah blah ...
stackoverflow.com |
 |