3 ms·
I really wasn't awake when I wrote this, because that second example is awful. It should be: {k:v for k, v in something.iteritems() if v == 3} vs dict(fi
by emidln 14y ago
I really wasn't awake when I wrote this, because that second example is awful. It should be:
{k:v for k, v in something.iteritems() if v == 3}
vs
dict(filter(lambda x: x[1] == 3, something.iteritems()))