I have a list of values like:
[\"a\", 1, \"b\", 2, \"c\", 3]
and I would like to build such a dict from it:
{\"a\": 1, \"b\
This seems rather succint, but I wouldn't call it very natural:
>>> l = ["a", 1, "b", 2, "c", 3] >>> dict(zip(l[::2], l[1::2])) {'a': 1, 'c': 3, 'b': 2}