2 ms·
Technically that's a dict comprehension, not a list comprehension (though they are pretty much the same). The old style, before they existed, was to create a li
by Izkata 3y ago
Technically that's a dict comprehension, not a list comprehension (though they are pretty much the same). The old style, before they existed, was to create a list of 2-tuples (key/value pairs) in a list comprehension and pass that to dict().