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
try below code:
>>> d2 = dict([('one',1), ('two', 2), ('three', 3)]) >>> d2 {'three': 3, 'two': 2, 'one': 1}