Let\'s say I have a list a in Python whose entries conveniently map to a dictionary. Each even element represents the key to the dictionary, and the following o
a
May not be the most pythonic, but
>>> b = {} >>> for i in range(0, len(a), 2): b[a[i]] = a[i+1]