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
{x: a[a.index(x)+1] for x in a if a.index(x) % 2 ==0} result : {'hello': 'world', '1': '2'}