Is there a way to map a list onto a dictionary? What I want to do is give it a function that will return the name of a key, and the value will be the original value. For example
In Python 3 you can use this dictionary comprehension syntax:
def foo(somelist): return {x[0]:x for x in somelist}