3 ms·
I appreciate where you're coming from, but this particular order allows you to reuse a variable. E.g, in earlier pythons which didn't yet have ":=", the example
by tpoacher 5y ago
I appreciate where you're coming from, but this particular order allows you to reuse a variable. E.g, in earlier pythons which didn't yet have ":=", the example given by the comment below yours could be written as:
[ z for x in range(1,6) for y in [x+1] for z in [2*y] for z in [-z] ]
Obviously not the kind of style you'd want to see in written code, but ...