3 ms·
outputs = [y for x in inputs if (y := f(x)) is not None] I can't stand this new syntax, y is declared and assigned after the first instance of i
by legostormtroopr 8y ago
outputs = [y for x in inputs
if (y := f(x)) is not None]
I can't stand this new syntax, y is declared and assigned after the first instance of its use.