>>> items = [['a', 1], ['b', 2], ['c', 3], ['d', 4], ['e', 5]] >>> {a[0]: a[1] for a in items} {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}
By Joe Meilinger